추가하기
route add [Destination] [Gateway] [Metric]
e.g.) route add 192.168.188.0 192.168.88.1 1
(0 means all)
삭제하기
route delete [Destination] [Gateway] [Metric]
e.g.) route delete 192.168.188.0 192.168.88.1 1
host/net modifier
route [add/delete] [host/net] [Destination] [Gateway] [Metric]
e.g.)route add net 192.168.188 192.168.88.1
-host Force the destination to be interpreted as a
host.
-net Force the destination to be interpreted as a
network.
For example:
Destination Destination Equivalent
128.32 -host 128.0.0.32
128.32.130 -host 128.32.0.130
-net 128.32 128.32.0.0
-net 128.32.130 128.32.130.0
routing table 확인
host> netstat -nr
Routing Table:
Destination Gateway Flags Ref Use Interface
192.168.188.0 192.168.88.1 UG 0 0
host>
Booting 시 자동으로 추가되도록 file로 저장
/etc/rc2.d/ 아래에 'S'로 시작하는 이름의 file을 만들어 그 안에 다음과 같이 command 저장
/usr/sbin/route add net 192.168.188.0 192.168.88.1 1
route add [Destination] [Gateway] [Metric]
e.g.) route add 192.168.188.0 192.168.88.1 1
(0 means all)
삭제하기
route delete [Destination] [Gateway] [Metric]
e.g.) route delete 192.168.188.0 192.168.88.1 1
host/net modifier
route [add/delete] [host/net] [Destination] [Gateway] [Metric]
e.g.)route add net 192.168.188 192.168.88.1
-host Force the destination to be interpreted as a
host.
-net Force the destination to be interpreted as a
network.
For example:
Destination Destination Equivalent
128.32 -host 128.0.0.32
128.32.130 -host 128.32.0.130
-net 128.32 128.32.0.0
-net 128.32.130 128.32.130.0
routing table 확인
host> netstat -nr
Routing Table:
Destination Gateway Flags Ref Use Interface
192.168.188.0 192.168.88.1 UG 0 0
host>
Booting 시 자동으로 추가되도록 file로 저장
/etc/rc2.d/ 아래에 'S'로 시작하는 이름의 file을 만들어 그 안에 다음과 같이 command 저장
/usr/sbin/route add net 192.168.188.0 192.168.88.1 1
'technical' 카테고리의 다른 글
H.324M/3G-324M 정리 (22) | 2008.03.04 |
---|---|
Favicon 이야기 (22) | 2008.02.11 |
VIM options (0) | 2007.04.06 |
Oracle User Creation (0) | 2007.01.24 |
Solaris에서 IP 주소 변경하기. (0) | 2007.01.23 |