Configuring TCP / IP on the Linux operating system
a) Check the configuration of TCP / IP
[Root @ linux /] # ifconfig
Write and explain the output of the command above?
To view the network configuration such as IP address in a network
eth0 Link encap: Ethernet HWaddr 00:50: BA: C0: E1: 0A
inet addr: 192.168.0.1 Bcast: 192.168.0.255 Mask: 255.255.255.0
lo Link encap: Local Loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
b) configuring TCP / IP
IP configuration can be done in several ways, including:
[Root @ linux /] # netconfig
or
[Root @ linux /] # ifconfig eth0 192.168.0.2 netmask 192.168.0.7 broadcast 255 255 255 248
[Root @ linux /] # ifconfig eth0: 1 192.168.0.2 netmask 192.168.0.7 broadcast 255 255 255 248
Configuring Routing (Gateway)
[Root @ linux /] # route add-net 192.168.0.0 gw 192.168.0.1 netmask 255.255.255.0
[Root @ linux /] # route del-net 192.168.0.0 gw 192.168.0.1
[Root @ linux /] # route add default gw 192.168.0.1
Write and explain the output of the command above?
Route add: to add a routing table
-Net 192.168.0.0: to add information of a network router server
netmask: netmask to add information network router server
i: to add the gateway address for a server
all done on orders over masing2 server router,
route del: delete a routing table information
default: to add information server router address as its default gateway
Configuring TCP / IP and default gateway is contained in a file
/ Etc/sysconfig/network-scripts/ifcfg-eth0
• Edit your NIC configuration
[Root @ linux /] # vi / etc/sysconfig/network-scripts/ifcfg-eth0
Replace the NIC configuration with
DEVICE = eth0
ONBOOT = yes
BOOTPROTO = static
BROADCAST = 10.1.3.xx
IPADDR = 10.1.3.yy
Netmask = 255.255.255.0
NETWORK = 10.1.3.zz
GATEWAY = 10.1.3.1
Where "yy" is the last two digits for the number hostID (no serial numbers absent or monitor) praktikan! "Xx" and "ZZ" is determined based on the predetermined netmask 255.255.255.0
• Restart, stop or start service network!
[Root @ linux /] # service network restart
[Root @ linux /] # / etc / rc.d / init.d / network stop
[Root @ linux /] # / etc / init.d / network start
• Checking the results of the new configuration
[Root @ linux /] # ifconfig
Write and explain the output of the command above?
eth0 Link encap: Ethernet HWaddr 00:50: BA: C0: E1: 0A
inet addr: 10.1.3.64 Bcast: 10.1.3.255 Mask: 255.255.255.0
eth0: hardware is the type of Ethernet line cards
Hwadds: ethernet mac addresses
inet addr: ip address of computer
10.1.3.255 broadcast: broadcast address
mask of 255.255.255.0: masking of a network with 254 rations ip address
• Checking connectivity to host a neighbor!
[Root @ linux /] # ping [ip_tetangga_anda]
• Checking connectivity to all hosts on the network (broadcast)!
[Root @ linux /] # ping [ip_broadcast]-b
RA.Kartini
14 years ago
0 komentar:
Post a Comment