12.07.2015 Views

download

download

download

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Default RoutingIf an outgoing packet is not destined for a local subnet (that is taken from the IPaddress and subnet mark configured on network interfaces), the packet will beforwarded to a default router (gateway) for further routing decision makingand delivery.Chapter 7The default gateway address should be installed in the host's routing table. This canbe done manually using the route(8) utility. You can add the default route entry inthe routing table by using the following command:# route add default 192.168.0.1add net default: gateway 192.168.0.1In the above example 192.168.0.1 is the IP address (or hostname) of your gateway.Obviously, the default gateway should be in the same IP subnet as your host.If a routing entry for default gateway is already installed in your routing table andyou want to modify the entry, you should use the route change command instead:# route change default 192.168.0.21change net default: gateway 192.168.0.21And to verify the installation of the default route in the routing table, the route getcommand will be used as shown in the following commands:# route get defaultroute to: defaultdestination: defaultmask: defaultgateway: 192.168.0.21interface: fxp0flags: recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtuexpire0 0 0 0 0 0 1500 0The route(8) command and FreeBSD's routing capabilities are explained in moredetail in Chapter 10, Network Configuration—Routing and Bridging.[ 119 ]

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

Saved successfully!

Ooh no, something went wrong!