Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the.

Similar presentations


Presentation on theme: "Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the."— Presentation transcript:

1 Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the ip address as well as netmask and broadcast

2 Ipconfig ifconfig eth0 addr 129.123.109.154 broadcast 129.123.7.255 netmask 255.255.255.0 Netmask forces TCP/IP to go only to the router interface for any address except those in 129.123.7. Broadcast limits broadcasts to the 129.123.7 subnet

3 DHCP Dynamic Host Configuration Protocol Allows the client to grab TCP/IP setup information from a centralized service The client broadcasts the request over it’s ethernet interface. The broadcast passes through the switches until it get to the router The router recognizes the DHCP request and forwards that request to a system or systems that are configured into the router.

4 DHCP The DHCP server receives the request and matches the ethernet (MAC) address to a table in the server. If it finds a match then an assigned IP address, router address, nameserver addresses, timeserver addresses, and other configuration data is sent to the client to set up the clients ip configuration. If the ethernet address does not match anything in the table then the server will assign a temporary (dynamic) address (at USU this address is non-routable) to the client. This address has a timeout (usually 2 hours) and the client must renew the address after the timeout expires. Typically the client renews the same address. If the client shuts down and restarts after the 2 hour timeout, it may receive a new address in the same subnet as the previous address.

5 USU DHCP The dynamic pool at USU consists of a non-routable domain (172.17) and the subnet based on the building at large subnet. Old Main’s building subnet is.25. so the subnet is 172.17.25.xxx The mobile address pool is 172.18.xxx.xxx

6 Name Service DHCP typically assigns the nameservers for the linux box. DHCP does not assign the search domain for the box. If the domain search field is set to usu.edu then you can access: cc.usu.edu as just cc. If you want to contact www.cs.usu.edu you would have to use www.cswww.cs.usu.eduwww.cs If the domain search field is usu.edu and cs.usu.edu then you can access www.cs.usu.edu as www.www.cs.usu.edu The ambiguity is: What if you want www.usu.edu and not www.cs.usu.edu.www.usu.edu www.cs.usu.edu You would then need to use the fully qualified host name to contact the site you desire. The file to select the domain name is called /etc/resolv.conf

7 Routers Routers are added via DHCP or the route command. The default route for a system is the address that all of the packets flow if they are resolved elsewhere. Other routers may be defined using appropriate netmasks and ip addresses. Since route configuration may follow indistinct paths the configuration may have to tell route how may hops (intermediate routers) there are between the local box and the actual ‘default’ router.

8 PPP (dialup) PPP will automatically configure the linux box to act as a router for the dialin users. When a user dials in, the PPP protocol starts typically immediately so the user doesn’t see a login prompt. The PPP authorization is built into the protocol. NAT (Network Address Translation) will allow the linux box to take packets from systems on an internal (non-routable) address and translate those requests to the address of the router interface.

9 Linux as a router The linux box can handle up to 4 NIC (network interface cards) to act as a router for a wide area network and 3 internal networks. With this configuration the linux box can act as a firewall. The program routed handles the packet exchange between boards. Care must be exercised so that packets are misrouted, i.e. packets are sent to the wrong interface. One of the interfaces is the WAN and should be listed as the default router.

10 IP access control Iptables can limit packets (by address and port) in either direction (coming in to the box or going out of the box) If a particular address needs to be filtered then Iptables can block that address and never even look a which port it’s want to attach to. IP access can be controlled (filtered) by using Iptables on the linux box. Iptables can also limit which service (port) is available to outside addresses.

11 Inetd Inetd controls which services are accessible from the internet The port numbers inetd translate into service names are located in /etc/services. Inetd controls what process owns the service and what flags are passed to the service program. Inetd times outs the service program when the internet user completes to that memory and CPU time are freed.

12 Inetd server programming Xinetd redirects input that would be from stdin and takes that from the IP packets Xinetd redirects output that would go to stdout and puts them into the IP packets. If a program is dispatched through xinetd then all I/O can be done via stdin and stdout

13 Background Programs The xinetd system has a time latency since packets need to be dispatched and the a program must start before the service can begin. To enhance network speed a program can be started at boot time and run in the background. These programs must communicate with the TCP/IP stack using system calls. Stdin and stdout will be lost or redirected to system logs and not the network.

14 Network Programs High network intensive programs need to run at all times on the system. Examples are: Web servers (http) May run several processes to gain throughput Network file services Remote Procedure Call programs Mail Low impact programs telnet ftp time

15 Network monitoring ping echo test traceroute check the router path netstat -r show the routing table -i shows the interfaces -p what program is doing network stuff No option What is presently going on

16 External Tools Sniffer, snoop, tcpdump Look at packets on the wire Nmap What ports are open? Network graphs Why is my network access so slow?

17 December 2, 2004 Remember to do Homework 7 from the website! The End


Download ppt "Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the."

Similar presentations


Ads by Google