1 / 8

Configuring TCP/IP

Configuring TCP/IP. Configuring a network interface. In Unix there are essentially two commands that are used to enable TCP/IP. Ifconfig – (Interface Configuration) Route -Adds a network route. ifconfig eth0. eth0 Link encap:Ethernet HWaddr 00:03:FF:02:95:3E

aisha
Télécharger la présentation

Configuring TCP/IP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Configuring TCP/IP

  2. Configuring a network interface • In Unix there are essentially two commands that are used to enable TCP/IP. • Ifconfig – (Interface Configuration) • Route -Adds a network route

  3. ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:03:FF:02:95:3E inet addr:192.168.131.66 Bcast:192.168.131.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:793 errors:3 dropped:0 overruns:0 frame:0 TX packets:477 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1032832 (1008.6 Kb) TX bytes:30910 (30.1 Kb) Interrupt:11 Base address:0xec00

  4. Creating an Interface • ifconfig eth0 192.168.0.22 netmask 255.255.255.0

  5. Running DHCP • To obtain an IP address from a DHCP server one would use dhcpcd(Client Daemon) • dhcpcd ethX • Where X is the network interface number.

  6. Specifying a DNS Server • /etc/resolv.conf • This file would contain the following; • Nameserver <IP OF DNS SERVER>

  7. Adding a route • The following are sample route commands. • route add –net 192.168.5.0 netmask 255.255.255.0 eth0 • Adds a route to the 192.168.5.0/24 network (no gateway)

  8. Route example (Con’t) • Route add –net 192.168.22.0 netmask 255.255.255.0 gw 192.168.22.5 eth0 • Adds a route to the 192.168.22.0/24 network with 192.168.22.5 as a gateway. • Route add default gw 192.168.0.1 • Sets 192.168.0.1 as the default gateway

More Related