리눅스 ip

  다른 뜻에 대해서는 IP 주소 문서를 참조하십시오.

1 개요[ | ]

ip, ip utility
ip 유틸리티, ip 도구
/sbin/ip
  • 네트워크 라우팅, 장치 설정 조회/변경 리눅스 명령어
  • net-tools 패지키의 일부
  • ifconfig 명령어를 대체하기 위해 설계됨

2 예시 1: ip addr[ | ]

[root@zetawiki ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:5e:54:5b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.80/24 brd 192.168.0.255 scope global eth1
    inet6 fe80::20c:29ff:fe5e:545b/64 scope link 
       valid_lft forever preferred_lft forever
[root@zetawiki ~]# ip addr show eth1
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:5e:54:5b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.80/24 brd 192.168.0.255 scope global eth1
    inet6 fe80::20c:29ff:fe5e:545b/64 scope link 
       valid_lft forever preferred_lft forever
[root@zetawiki ~]# ip addr add 192.168.0.100/24 dev eth1 label eth1:0
[root@zetawiki ~]# ip addr show eth1
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:5e:54:5b brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.80/24 brd 192.168.0.255 scope global eth1
    inet 192.168.0.100/24 scope global secondary eth1:0
    inet6 fe80::20c:29ff:fe5e:545b/64 scope link 
       valid_lft forever preferred_lft forever

3 예시 2[ | ]

[root@zetawiki ~]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:5e:54:5b brd ff:ff:ff:ff:ff:ff
[root@zetawiki ~]# ip route
192.168.0.0/24 dev eth1  proto kernel  scope link  src 192.168.0.80 
169.254.0.0/16 dev eth1  scope link  metric 1002 
default via 192.168.0.1 dev eth1
기본 게이트웨이: 192.168.0.1

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}