반응형
1. eth1 에 vlan 100 인터페이스 추가하기
2. vlan 삭제하기
[root@localhost ~]# vconfig add eth1 100
Added VLAN with VID == 100 to IF -:eth1:-
[root@localhost ~]# ifconfig eth1.100 100.1.1.1
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:AF:F2:7D
inet addr:10.1.3.1 Bcast:10.1.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feaf:f27d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8281 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:10796549 (10.2 MiB)
Interrupt:59 Base address:0x20a4
eth1.100 Link encap:Ethernet HWaddr 00:0C:29:AF:F2:7D
inet addr:100.1.1.1 Bcast:100.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::20c:29ff:feaf:f27d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:1782 (1.7 KiB)
Added VLAN with VID == 100 to IF -:eth1:-
[root@localhost ~]# ifconfig eth1.100 100.1.1.1
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:AF:F2:7D
inet addr:10.1.3.1 Bcast:10.1.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feaf:f27d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8281 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:10796549 (10.2 MiB)
Interrupt:59 Base address:0x20a4
eth1.100 Link encap:Ethernet HWaddr 00:0C:29:AF:F2:7D
inet addr:100.1.1.1 Bcast:100.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::20c:29ff:feaf:f27d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:1782 (1.7 KiB)
2. vlan 삭제하기
[root@localhost ~]# vconfig rem eth1.100
Removed VLAN -:eth1.100:-
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:AF:F2:7D
inet addr:10.1.3.1 Bcast:10.1.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feaf:f27d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:10803236 (10.3 MiB)
Interrupt:59 Base address:0x20a4
Removed VLAN -:eth1.100:-
[root@localhost ~]# ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:AF:F2:7D
inet addr:10.1.3.1 Bcast:10.1.3.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:feaf:f27d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:10803236 (10.3 MiB)
Interrupt:59 Base address:0x20a4
반응형
'IT Tech > Linux' 카테고리의 다른 글
awk에서 쉘파라메터 사용하기 (0) | 2015.06.12 |
---|---|
[LINUX] ARP 테이블 클리어, ip 툴 (0) | 2015.01.30 |
VMWare+Linux 루트 패스워드(Root Password) 복구 방법!! (0) | 2013.11.17 |
[리눅스] 인터페이스 맥 주소(MAC Address) 수정하기 (0) | 2012.04.26 |
[리눅스] screen utility 사용법 (0) | 2012.01.14 |
[C언어] 리눅스 프로세스 이름으로 프로세스 아이디(PID) 구하기 (0) | 2011.10.17 |
[네크워크&리눅스] tcpdump로 패킷 덤프 사용 예제 (0) | 2011.09.16 |
VIM 프로그래밍 관련 튜닝 및 운용 단축키 표(VIM Cheat Sheet)과 그밖의 팁 (0) | 2011.08.12 |
[리눅스] 프로세스 이름으로 검색(grep)해서 죽이기 (0) | 2011.08.05 |
[리눅스] 유팉 - grep 에서 특정 디렉토리(.svn)을 제외하고 검색하기 (0) | 2011.06.17 |