کد:Description VLAN IP Subnet Server 1 10.10.1.0/24 Wireless 2 10.10.2.0/24 Dialup 3 10.10.3.0/24 Other 4 10.10.4.0/24 Linux .::. Install : # yum install vconfig -y # apt-get install vconfig # installpkg vlan-1.9-i486-2.txz Configure : # nano /etc/vlan #!/bin/bash PATH="/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin" # ifconfig eth0 0.0.0.0 up ifconfig eth1 0.0.0.0 up ifconfig eth2 0.0.0.0 up ifconfig eth3 0.0.0.0 up # vconfig add eth0 1 vconfig add eth1 2 vconfig add eth2 3 vconfig add eth3 4 # Vlan 1 ifconfig eth0.1 10.10.1.2 netmask 255.255.255.0 route add default gw 10.10.1.1 # Vlan 2 ifconfig eth1.2 10.10.2.2 netmask 255.255.255.0 # Vlan 3 ifconfig eth2.3 10.10.3.2 netmask 255.255.255.0 # Vlan 4 ifconfig eth3.4 10.10.4.2 netmask 255.255.255.0 # chmod 777 /etc/vlan # /etc/vlan Cisco .::. interface VLAN1 ip address 10.10.10.1 255.255.255.0 ! ! interface FastEthernet 0/1 switchport trunk encapsulation dot1q switchport trunk native vlan 1 switchport mode trunk ! interface FastEthernet0/2 switchport access vlan 2 ! interface FastEthernet0/3 switchport access vlan 3 ! interface FastEthernet0/4 switchport access vlan 4 ! interface FastEthernet0/5 switchport access vlan 2
موضوعات مشابه: