3

, Linux ( UNIX ) . !

     Linux

2 , Linux:

# route

:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 ra0
default         dsl-router      0.0.0.0         UG    0      0        0 ra0

:

$ /sbin/route

:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
191.255.255.0   *               255.255.255.0   U     0      0        0 eth0
169.254.0.0     *               255.255.0.0     U     0      0        0 eth0
default         191.255.255.1   0.0.0.0         UG    0      0        0 eth0

. :

route add default gw {IP-} {}

:

  • IP- - IP - ;
  • - , ;

, IP - 192.168.1.254 eth0, root :

# route add default gw 192.168.1.254 eth0

( , DNS):

# route add default gw dsl-router eth0

ip, 192.168.1.254, eth0:

# ip route add 192.168.1.0/24 dev eth0

eth0 . , :)

# ip route add 192.168.1.0/24 via 192.168.1.254

!


50% Merion Academy