12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Network Configuration—BasicsOnce you run the netif rc script, you should then run the routing rc script totell the system to install appropriate routing entries into the system's routing tableas follows:# /etc/rc.d/routing restartThe netif rc script may remove default route (and other routes) from therouting table. Based on this fact, manually running these rc scripts over anetwork connection (For example SSH and Telnet) is not recommended asyou may lose your remote access to the device. However, there is less riskof losing connectivity to the host if you are on the same subnet asthe server.Configuring IP AddressTo assign an IP address to a network interface, you may use ifconfig with thefollowing syntax:# ifconfig fxp0 inet 192.168.0.10 netmask 255.255.255.0This will assign IPv4 address 192.168.0.10 with netmask 255.255.255.0 tonetwork interface fxp0. The ifconfig utility also supports CIDR notation whileassigning IP addresses to an interface. For example, you may use the followingcommand which has the same result as the previous example:# ifconfig fxp0 inet 192.168.0.10/24The inet keyword (called address family) indicates that we want to assign an IPv4address to the interface. The ifconfig utility supports different address families asshown in the following list:• inet for IPv4 address family.• inet6 for IPv6 address family.• atalk for AppleTalk protocol.• ipx for Novell IPX/SPX protocol suite.• link, ether, and lladdr for Layer2 (Ethernet) protocol.If no address family is defined, the ifconfig assumes the inet address familyby default.To assign an IPv6 address to the interface, you may use the following syntax:# ifconfig fxp0 inet6 2001:db8:bdbd::123 prefixlen 48[ 106 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!