Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP/IP Networking Objectives –to learn how to integrate a SuSE system onto a TCP/IP network Contents –the TCP/IP protocol suite –IP addressing –basic TCP/IP.

Similar presentations


Presentation on theme: "TCP/IP Networking Objectives –to learn how to integrate a SuSE system onto a TCP/IP network Contents –the TCP/IP protocol suite –IP addressing –basic TCP/IP."— Presentation transcript:

1 TCP/IP Networking Objectives –to learn how to integrate a SuSE system onto a TCP/IP network Contents –the TCP/IP protocol suite –IP addressing –basic TCP/IP applications –TCP/IP configuration files Practicals –working with TCP/IP utilities and files Summary

2 Overview of TCP/IP US DoD funded experimental network –supports inter-networks, inter-host communication –most popular UNIX networking protocols Three basic protocols TCP - a reliable session protocol: telnet, ftp UDP - low overhead sessionless: NFS, NIS, DNS, routing IP - Network layer protocol, sessionless, base of TCP and UDP gatewaynetwork hosts

3 All networked systems need a unique IP address –address has four dot separated numbers (each 0 - 255) –IP address mapped to hardware using ARP or RARP protocols Companies allocated a site address by NIC –allocated class A B or C address ranges –local administrator allocates individual host numbers Some address values reserved 0not used 255reserved for broadcasts Network address of 127 is reserved for loopback Network address of 10 is reserved for internal networks Network addesss of 172.16 is reserved for internal networks Network addesss of 192.168 is reserved for internal networks Internet Protocol Address

4 7 bits 0 8 bits 24 bits 24 bit host addressnetwork 1 16 bit host address16 bit network 0 network addresses in range 0 - 126 network addresses in range 128.0 - 191.254 1 8 bit host 24 bit network 0 network addresses in range 192.0.0 - 223.254.254 1 14 bits16 bits 21 bits 8 bits Class A Addresses Class B Addresses Class C Addresses IP Address Format

5 Defining IP Addresses Traditionally IP address defined in /etc/hosts –one line per known host defining IP address hostname and aliases –if last line is a + then NIS is being used –hostnames are limited to 8 characters Larger sites use DNS (Domain Name Services) –one or more hosts on the network maintain all IP addresses –individual hosts request addresses as needed –address cached locally to optimise DNS # more /etc/hosts 127.0.0.1localhost.localdomainlocalhost 192.168.0.12mash4077loghost mailhost 192.168.0.42rosies printserver 10.1.1.1seoul # more /etc/hosts 127.0.0.1localhost.localdomainlocalhost 192.168.0.12mash4077loghost mailhost 192.168.0.42rosies printserver 10.1.1.1seoul

6 Analyze Network Interface Configuration Use ifconfig to view network interfaces –use the -a option to list all configured interfaces # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:50:04:50:61:98 inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:59078481 errors:0 dropped:0 overruns:84 frame:0 TX packets:53902612 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:22596609 errors:0 dropped:0 overruns:0 frame:0 TX packets:22596609 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 # ifconfig eth0 down # ifconfig eth0 up # ifconfig -a eth0 Link encap:Ethernet HWaddr 00:50:04:50:61:98 inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:59078481 errors:0 dropped:0 overruns:84 frame:0 TX packets:53902612 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:22596609 errors:0 dropped:0 overruns:0 frame:0 TX packets:22596609 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 # ifconfig eth0 down # ifconfig eth0 up

7 Network Interface Configuration Use ifconfig to configure the network interface Permanent changes in /etc/sysconfig/network Files named like: ifcfg-eth-id- STATIC settings: DHCP settings: Alias interfaces Permanent changes in /etc/sysconfig/network-scripts/ifcfg-eth-id- Releasing/Renewing IP adresses ifdown eth0 / ifup eth0 # ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up STARTMODE=auto BOOTPROTO=static BROADCAST=192.168.0.255 NETWORK=192.168.0.0 NETMASK=255.255.255.0 IPADDR=192.168.0.1 STARTMODE=auto BOOTPROTO=static BROADCAST=192.168.0.255 NETWORK=192.168.0.0 NETMASK=255.255.255.0 IPADDR=192.168.0.1 DEVICE=eth0 BOOTPROTO=dhcp STARTMODE=auto # Ifconfig eth0:0 192.168.1.12 IPADDR_0='192.168.1.99' NETMASK_0='255.255.255.0' LABEL_0='0' IPADDR_0='192.168.1.99' NETMASK_0='255.255.255.0' LABEL_0='0'

8 Routing information Use route to get/manipulate network routing –Route table netstat –r(n) or route –Routes to all directly connected networks are created automatic –To add a net-route: route add –net 192.168.7.0 gw 192.168.1.254 –To delete a net-route: route del –net 192.168.7.0 gw 192.168.1.254 SuSE can hande RIP/OSPF + traffic shaping Metric value for priority if different value or round robin if same: route add –net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.253 metric 10 route add –net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.254 metric 10 Detete the route: route del –net 192.168.3.0 netmask 255.255.255.0 # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 80.84.37.0 * 255.255.255.240 U 0 0 0 eth3 172.16.0.0 * 255.255.255.0 U 0 0 0 eth2 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default router.ing-stee 0.0.0.0 UG 0 0 0 eth3 # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 80.84.37.0 * 255.255.255.240 U 0 0 0 eth3 172.16.0.0 * 255.255.255.0 U 0 0 0 eth2 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default router.ing-stee 0.0.0.0 UG 0 0 0 eth3

9 Routing information configuration Use route to configure the defaultrouter Permanent changes in /etc/sysconfig/network File named routes: Using several routes Permanent changes in /etc/sysconfig/network/routes Another way is to use /etc/init.d/boot.local This way is the most common in other RPM distributions # route add default gw 192.168.1.1 eth0 default 192.168.1.1 - - # route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.254 eth0 route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.1.254 eth0 10.0.0.0 192.168.1.254 255.0.0.0 eth-id-00:03:47:b0:5e:85

10 Adding/Removing NIC’s Adding NIC 1.Before going further, find out current NIC-order a) By physical inspection, pinging and moving cables. b) Look in /etc/modprobe.conf or find NIC modules with lsmod, lsdev, hwinfo, lspci and ksymoops Kernel key symbol is exported like [3c59x] for 3c905 boards. c) Modify /etc/modprobe.conf to reflect your wished NIC order. 2.Look if new NIC needs to be added in kernel or kernel need patch. If that is the case, recompile kernel and do step 1 again! 3.Power off the host 4.Insert the new NIC 5.If you are lucky, hwinfo and hald will find the new NIC and add it for you, you will be asked configuration parameters. 6.If everything goes well you can now goto step 1 once again to check out your NIC order. If you are satisfied it is time to do NIC configuration permanent. Removing NIC, you basically do the same steps but you now remove support, hald will detect NIC removal and you can remember its configuration.

11 Changing NIC parameters Use ethtool to view NIC settings Using mii-tool to force 100MBit/s Full Duplex Making changes permanent /etc/init.d/boot.local # ethtool eth0 Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: g Wake-on: d Current message level: 0x00000007 (7) Link detected: yes # ethtool eth0 Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 1 Transceiver: internal Auto-negotiation: on Supports Wake-on: g Wake-on: d Current message level: 0x00000007 (7) Link detected: yes # ethtool -s eth0 speed 100 duplex full

12 Nameservers for non nameserver hosts Nameservers are stored in /etc/resolv.conf General format: NameserverThe nameservers to query for names DomainMy domain, my host is added to this domain. SearchA space delimited list of max six key domains to add hostnames to in the query if domain is missing. Optionsrotate round robin Nameserver list timeout:ndefault is 30 seconds attempts:ndefault is 3 or 4 Searchorder for finding hosts are stored in /etc/host.conf Name Service Switch config file /etc/nsswitch.conf domain my-site.com search my-site.com nameserver ip 2 nameserver ip 1 nameserver ip 3 order hosts,bind Hosts: files lwres dns

13 Looking at Network Statistics Use netstat to get network status information –use -a to view all sockets –use -i to view interfaces –use -rn to view routing statistics MRTG Multi Router Traffic Grapher –Is common to make graphs over network traffic –Usally togeather with SNMP Simple Network Management Protocol –Apache is common for presentation of plots # netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 59098394 0 0 84 53924429 0 0 0 BRU lo 16436 0 22598046 0 0 0 22598046 0 0 0 LRU # netstat -i Kernel Interface table Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg eth0 1500 0 59098394 0 0 84 53924429 0 0 0 BRU lo 16436 0 22598046 0 0 0 22598046 0 0 0 LRU

14 Activating SNMP Actviating at boot and starting SNMPD server –Your server will now respond to SNMP messages Check that SNMP server responds –Your server will now respond to SNMP messages –The ”password” public can be secured in /etc/snmpd.conf Apache webserver is needed for presentation –You simply ”browse” to read your network plots –It is most simple to setup one ”plotting” directory in DocumentRoot # insserv /etc/init.d/snmp ; rcsnmpd start # snmpwalk -v 1 -c public localhost interface #rocommunity public 127.0.0.1 rocommunity crazy42guy #rocommunity public 127.0.0.1 rocommunity crazy42guy # mkdir /srv/www/htdocs/mrtg

15 Activating MRTG Autoconfigure MRTG with cfgmaker –First create config directory –Then execute the autoconfig –All must be in one row! Test run MRTG 3 times –MRTG will now make three test plots, the warnings will go away Use MRTG's indexmaker command to create a Web index page Add a CRON job to run MRTG every 5 minute –Enter with crontab –e Check the plots with web-browser # mkdir /etc/mrtg/ # cfgmaker --output=/etc/mrtg/mrtg.cfg \ --global "workdir: /srv/www/htdocs/mrtg" -ifref=ip \ --global 'options[_]: growright,bits' \ crazy42guy@localhost # mkdir /etc/mrtg/ # cfgmaker --output=/etc/mrtg/mrtg.cfg \ --global "workdir: /srv/www/htdocs/mrtg" -ifref=ip \ --global 'options[_]: growright,bits' \ crazy42guy@localhost # env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg # indexmaker --output=/srv/www/htdocs/mrtg/index.html \ /etc/mrtg/mrtg.cfg 0-59/5 * * * * env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg http:// /mrtg/index.html

16 Looking for a System The simplest TCP/IP utility is ping which sends a message to a host and waits for a reply –the host can be specified as a name or an IP address $ ping –c1 gkse1 PING gkse1.ing-steen.se (80.84.37.2) from 80.84.37.3 : 56(84) bytes of data. 64 bytes from gkse1.ing-steen.se (80.84.37.2): icmp_seq=0 ttl=64 time=1.119 mse --- gkse1.ing-steen.se ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/mdev = 1.119/1.119/1.119/0.000 ms $ ping ulf2 PING ulf2.intra.ing-steen.se (192.168.1.37) from 192.168.1.100 : 56(84) bytes of data. From lina.intra.ing-steen.se (192.168.1.100): Destination Host Unreachable --- ulf2.intra.ing-steen.se ping statistics --- 1 packets transmitted, 0 packets received, +1 errors, 100% packet loss $ ping dude ping: unknown host dude $ ping –c1 gkse1 PING gkse1.ing-steen.se (80.84.37.2) from 80.84.37.3 : 56(84) bytes of data. 64 bytes from gkse1.ing-steen.se (80.84.37.2): icmp_seq=0 ttl=64 time=1.119 mse --- gkse1.ing-steen.se ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/mdev = 1.119/1.119/1.119/0.000 ms $ ping ulf2 PING ulf2.intra.ing-steen.se (192.168.1.37) from 192.168.1.100 : 56(84) bytes of data. From lina.intra.ing-steen.se (192.168.1.100): Destination Host Unreachable --- ulf2.intra.ing-steen.se ping statistics --- 1 packets transmitted, 0 packets received, +1 errors, 100% packet loss $ ping dude ping: unknown host dude

17 Network layer 2 To see if you have contact with network layer 2 –use ifconfig Shows if interfaces are up –use arp Shows the local arp cache Manipulate with arp cache –Add static route To secure system and increase network speed –Flush arp cache If you have stale arp entries –Delete entry in arp cache Remove faulty entries # arp –s 192.168.0.12 00:0B:5F:12:81:00 # arp –d 192.168.0.12 # arp Address HWtype HWaddress Flags Mask Iface router.ing-steen.se ether 00:0B:5F:12:81:00 C eth3 grey.ing-steen.se ether 00:06:5B:1A:84:11 C eth3 # arp –s 192.168.0.12 00:0B:5F:12:81:00 # arp –d 192.168.0.12 # arp Address HWtype HWaddress Flags Mask Iface router.ing-steen.se ether 00:0B:5F:12:81:00 C eth3 grey.ing-steen.se ether 00:06:5B:1A:84:11 C eth3

18 Telnet & local name resolution 1/2 Telnet server settings –It is dependent of xinetd the internet demon –Xinetd starts telnet demon whenever connections to it’s port 23 is made declared in file /etc/xinetd.d/telnet –Most Xinetd dependent TCP/UDP services are declared in /etc/services –Offcource your telnet server need a login & welcome text like: Welcome to SuSE.. and Have a lot of fun... these are added in /etc/issue + /etc/issue.net and /etc/motd service telnet { socket_type = stream protocol = tcp wait = no user = root server = /usr/sbin/in.telnetd } service telnet { socket_type = stream protocol = tcp wait = no user = root server = /usr/sbin/in.telnetd } telnet 23/tcp # Telnet telnet 23/udp # Telnet telnet 23/tcp # Telnet telnet 23/udp # Telnet

19 Telnet & local name resolution 2/2 To activate telnet Telnet is used to access most network gears (routers) and many servers sitting in trusted networks The local name resolution should allways be setup to cover the most important hosts and servers. $ uname -n a01 $ telnet a02 My SuSE linux server! login: hawkeye password: Welcome to Uncle Sam's wonderful world of Unix Remember the bar never closes! $ uname -n a02 $ uname -n a01 $ telnet a02 My SuSE linux server! login: hawkeye password: Welcome to Uncle Sam's wonderful world of Unix Remember the bar never closes! $ uname -n a02 # cat /etc/hosts 127.0.0.1localhost.localdomainlocalhosta01 192.168.0.1a01.my-site.coma01# This host IP address! 192.168.0.2a02.my-site.coma02# Other important hosts 192.168.0.3a03.my-site.coma03 192.168.0.4a04.my-site.coma04 # cat /etc/hosts 127.0.0.1localhost.localdomainlocalhosta01 192.168.0.1a01.my-site.coma01# This host IP address! 192.168.0.2a02.my-site.coma02# Other important hosts 192.168.0.3a03.my-site.coma03 192.168.0.4a04.my-site.coma04 # chkconfig telnet on ; rcxinetd restart

20 SSH (Secure Shell) 1/2 The SSH command is used to connect or copy files to/from another machine over a TCP/IP network –It is a stand alone service –It is activated by default in SuSE and most other linuxes. –Encryption makes use of private and public keys id_rsaprivate key id_rsa.pubpublic key known_hostspublic key container Configuration files: /etc/ssh/sshd_config –Most common options to change is: Port 22Change this Protocol 2,1SSH protocol V2 and V1 ListenAddress 0.0.0.0Bind to all interfaces as here or to one only PermitRootLogin no Disable root direct logins # chkconfig --list sshd sshd 0:off 1:off 2:off 3:on 4:off 5:on 6:off # chkconfig --list sshd sshd 0:off 1:off 2:off 3:on 4:off 5:on 6:off # ls.ssh/... id_rsa id_rsa.pub known_hosts # ls.ssh/... id_rsa id_rsa.pub known_hosts

21 SSH (Secure Shell) 2/2 SSH login –a connection is established and the user logs on as normal First time you login to a new server a public key must eventually be generated and stored in known_hosts, Second time login will eventually prompt you for password. SSH copy –From current host to any other host running sshd –From any other host to current host –Between two remote hosts FileZilla & Putty –Login & Copy tools for use with Windows to administer your unix servers $ hostname a02 $ ssh peter@a01 password: $ hostname a01 $ hostname a02 $ ssh peter@a01 password: $ hostname a01 # scp filename.txt ungk4@192.168.0.3:~ungk4/.ungk4@192.168.0.3:~ungk4/ Welcome to Linux (i586) Password: filename.txt 100% 1166 1.1KB/s 00:00 # scp filename.txt ungk4@192.168.0.3:~ungk4/.ungk4@192.168.0.3:~ungk4/ Welcome to Linux (i586) Password: filename.txt 100% 1166 1.1KB/s 00:00

22 FTP is an interactive utility for network file transfer –login to remote host supplying username and password –FTP can be run as xinetd or stand alone service Anonymous FTP server –Allows only user anonymous or ftp to login Non Anonymous FTPserver –Allows also local registered users (passwd users) to login As standard it is Anonymous server –Only file download is allowed VSFTP has to be opened in order to do more VSFTP Very Secure FTP $ ftp a01 Connected to a01 Name (a01:hawkeye): Password: ftp> get file2...data about the transfer... ftp> put /etc/hosts /tmp/mash.hosts...data about the transfer... ftp> bye $ ftp a01 Connected to a01 Name (a01:hawkeye): Password: ftp> get file2...data about the transfer... ftp> put /etc/hosts /tmp/mash.hosts...data about the transfer... ftp> bye

23 The file is in clear textand somewhat selfexplained, basicaly we have –General settings –Anonymous FTP settings –Transfer settings anonymous_enable=Yes/NoAllow anon users at all anon_upload_enable=Yes/No Allow anon users to uploadfiles anon_mkdir_write_enable=Yes/No Allow anon users to make dirs anon_root= FTP root settings userlist_enablevs.ftpd.user_list contain allowed users userlist_denyvs.ftpd.user_list contain denied users local_enable=Yes/NoAllow non anonymous local users to login write_enable=Yes/NoTo be allowed to write at all ftpd_banner= My FTP ServerWelcome message xferlog_enable=YES/NoLog filetransfers xferlog_file= Logfile Restrict FTP access using /etc/vsftpd.ftpusers file Chroot Jail users: /etc/vsftpd.chroot_list Ftp userlist: /etc/vsftpd.user_list VSFTPD setup: /etc/vsftpd.conf

24 There are many other options you can add to this file: Limiting the maximum number of client connections: max_clients Limiting the number of connections by source IP address: max_per_ip The maximum rate of data transfer per anonymous login: anon_max_rate The maximum rate of data transfer per non-anonymous login: local_max_rate 0=Unlimited Descriptions on this and more can be found in the vsftpd.conf man pages. Other vsftpd.conf Options

25 File Transfer Protocol

26 There are many other options you can add to this file: Limiting the maximum number of client connections: max_clients Limiting the number of connections by source IP address: max_per_ip The maximum rate of data transfer per anonymous login: anon_max_rate The maximum rate of data transfer per non-anonymous login: local_max_rate 0=Unlimited Descriptions on this and more can be found in the vsftpd.conf man pages. Other vsftpd.conf Options

27 FTP Users with Only Read Access to a Shared Directory 1. Disable anonymous FTP. Comment out the anonymous_enable line in the vsftpd.conf file like this: # Allow anonymous FTP? # anonymous_enable=YES 2. Enable individual logins by making sure you have the local_enable line uncommented in the vsftpd.conf file like this: # Uncomment this to allow local users to log in. local_enable=YES 3. Start VSFTP. [root@my-host]# service vsftpd start 4. Create a user group and shared directory. In this case, use /home/ftp- users and a user group name of ftp-users for the remote users [root@my-host]# groupadd ftp-users [root@my-host]# mkdir /home/ftp-docs VSFTP tutorial 1/3

28 5. Make the directory accessible to the ftp-users group. [root@my-host]# chmod 750 /home/ftp-docs [root@my-host]# chown root:ftp-users /home/ftp-docs 6. Add users, and make their default directory /home/ftp- docs [root@my-host]# useradd -g ftp-users -d /home/ftp-docs user1 [root@my-host]# useradd -g ftp-users -d /home/ftp-docs user2 [root@my-host]# useradd -g ftp-users -d /home/ftp-docs user3 [root@my-host]# useradd -g ftp-users -d /home/ftp-docs user4 [root@my-host]# passwd user1 [root@my-host]# passwd user2 [root@my-host]# passwd user3 [root@my-host]# passwd user4 VSFTP tutorial 2/3

29 7. Copy files to be downloaded by your users into the /home/ftp-docs directory 8. Change the permissions of the files in the /home/ftp-docs directory for read only access by the group [root@my-host]# chown root:ftp-users /home/ftp-docs/* [root@my-host]# chmod 740 /home/ftp-docs/* Users should now be able to log in via FTP to the server using their new usernames and passwords. If you absolutely don't want any FTP users to be able to write to any directory, then you should set the write_enable line in your vsftpd.conf file to no: write_enable = NO Remember, you must restart VSFTPD, if it is run as stand alone, for the configuration file changes to take effect. VSFTP tutorial 3/3

30 Here is a simple test procedure you can use to make sure everything is working correctly: 9. Check for the presence of a test file on the ftp client server. [root@my-friend]# ll total 1 -rw-r--r-- 1 root root 0 Jan 4 09:08 testfile [root@my-friend]# 10.Connect to bigboy via FTP [root@my-friend]# ftp 192.168.1.100 Connected to 192.168.1.100 (192.168.1.100) 220 ready, dude (vsFTPd 1.1.0: beat me, break me) Name (192.168.1.100:root): user1 331 Please specify the password. Password: 230 Login successful. Have fun. Remote system type is UNIX. Using binary mode to transfer files. ftp> Sample Login Session To Test if it works

31 As expected, we can't do an upload transfer of testfile to my-host. ftp> put testfile local: testfile remote: testfile 227 Entering Passive Mode (192,168,1,100,181,210) 553 Could not create file. ftp> But we can view and download a copy of the VSFTPD RPM located on the FTP server my- host. ftp> ls 227 Entering Passive Mode (192,168,1,100,35,173) 150 Here comes the directory listing. -rwxr----- 1 0 502 76288 Jan 04 17:06 vsftpd-1.1.0-1.i386.rpm 226 Directory send OK. ftp> get vsftpd-1.1.0-1.i386.rpm vsftpd-1.1.0-1.i386.rpm.tmp local: vsftpd-1.1.0-1.i386.rpm.tmp remote: vsftpd-1.1.0-1.i386.rpm 227 Entering Passive Mode (192,168,1,100,44,156) 150 Opening BINARY mode data connection for vsftpd-1.1.0-1.i386.rpm (76288 bytes). 226 File send OK. 76288 bytes received in 0.499 secs (1.5e+02 Kbytes/sec) ftp> exit 221 Goodbye. [root@my-friend]# Sample Login Session To Test if it works

32 As expected, anonymous FTP fails. [root@my-friend]# ftp 192.168.1.100 Connected to 192.168.1.100 (192.168.1.100) 220 ready, dude (vsFTPd 1.1.0: beat me, break me) Name (192.168.1.100:root): anonymous 331 Please specify the password. Password: 530 Login incorrect. Login failed. ftp> quit 221 Goodbye. [root@my-friend]# Now that testing is complete, you can make this a regular part of your FTP server's operation. Sample Login Session To Test if it works

33 Summary Unix systems use TCP/IP for networking Every host on the network must have a unique IP address The file /etc/hosts maps names into IP addresses for network utilities Systems using DNS don't keep local host files Unix supports standard TCP/IP programs such as ping, telnet and ftp Unix uses snmpd network analysis MRTG is nice to make graph over netstat Unix uses several TCP/IP configuration files in /etc (xinetd.conf, services, etc.)


Download ppt "TCP/IP Networking Objectives –to learn how to integrate a SuSE system onto a TCP/IP network Contents –the TCP/IP protocol suite –IP addressing –basic TCP/IP."

Similar presentations


Ads by Google