Wednesday, August 17, 2005

Solaris routing with multiple interfaces

Solaris routing with multiple interfaces
In this example, we have an hme2 network interface with an IP address
of 65.201.213.117, a network address of 65.201.213.112, and a subnet
mask of 255.255.255.240. The interface was initially enabled using the
default subnet mask and broadcast address.

ifconfig hme2
hme2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 65.201.213.117 netmask ff000000 broadcast 65.255.255.255

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
65.0.0.0 65.201.213.117 U 1 8 hme2

To correct the routing table:

1. Specify the correct subnet mask and broadcast address with ifconfig.
ifconfig 65.201.213.117 netmask 255.255.255.240 broadcast 65.201.213.127

2. Add an /etc/netmasks entry for the correct netmask to be used after
system reboot.
65.201.213.112 255.255.255.240

Corrected routing table:

Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
65.201.213.112 65.201.213.117 U 1 1 hme2

0 Comments:

Post a Comment

<< Home