Router
ip cef
!
interface FastEthernet0/0
ip address 172.16.0.2 255.248.0.0
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface FastEthernet0/1.10
encapsulation dot1Q 10
ip address 172.24.0.1 255.248.0.0
ip nat inside
no ip redirects
!
interface FastEthernet0/1.20
encapsulation dot1Q 20
ip address 172.32.0.1 255.248.0.0
ip nat inside
no ip redirects
!
ip nat pool Internet 172.16.0.1 172.16.0.1 netmask 255.248.0.0
ip nat inside source list 1 pool Internet overload
access-list 1 permit 172.24.0.0 0.7.255.255
access-list 1 permit 172.32.0.0 0.7.255.255
!
ip classless
ip route 0.0.0.0 0.0.0.0 172.16.0.1
!
service dhcp
!
ip dhcp excluded-address 172.24.0.1
ip dhcp excluded-address 172.32.0.1
ip dhcp excluded-address 172.24.0.2
ip dhcp excluded-address 172.32.0.2
ip dhcp excluded-address 172.24.0.3
ip dhcp excluded-address 172.32.0.3
ip dhcp excluded-address 172.24.0.4
ip dhcp excluded-address 172.32.0.4
ip dhcp excluded-address 172.24.0.5
ip dhcp excluded-address 172.32.0.5
!
ip dhcp pool vlan10
network 172.24.0.0 255.248.0.0
default-router 172.24.0.1
dns-server 208.67.222.222
!
ip dhcp pool vlan20
network 172.32.0.0 255.248.0.0
default-router 172.32.0.1
dns-server 208.67.222.222
!
ip nat outside source static tcp 172.24.0.1 1812 192.168.42.207 1812
ip nat outside source static udp 172.24.0.1 1812 192.168.42.207 1812
ip nat outside source static tcp 172.24.0.1 1813192.168.42.207 1813
ip nat outside source static udp 172.24.0.1 1813192.168.42.207 1813
Switch
aaa new-model
username cisco password Cisco
radius-server host 172.24.0.1 auth-port 1812 acct-port 1813 key Admin1234
radius-server host 172.32.0.1 auth-port 1812 acct-port 1813 key Admin1234
aaa authentication dot1x default group radius
dot1x system-auth-control
vlan database
vlan 10
vlan 20
exit
!
vlan 10
name 172.24.0.0/13
!
vlan 20
name 172.32.0.0/13
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1,10,20
switchport mode trunk
spanning-tree portfast
no cdp enable
!
interface FastEthernet0/2
switchport access vlan 10
switchport mode access
dot1x port-control auto
dot1x guest-vlan 20
dot1x timeout quiet-period 3
dot1x timeout tx-period 15
spanning-tree portfast
interface Vlan10
ip address 172.24.0.2 0.7.255.255
ip default-gateway 172.24.0.1
!
interface Vlan20
ip address 172.32.0.2 0.7.255.255
ip default-gateway 172.32.0.1
!

Cisco sample configuration

  • 1.
    Router ip cef ! interface FastEthernet0/0 ipaddress 172.16.0.2 255.248.0.0 ip nat outside duplex auto speed auto ! interface FastEthernet0/1 no ip address duplex auto speed auto ! interface FastEthernet0/1.10 encapsulation dot1Q 10 ip address 172.24.0.1 255.248.0.0 ip nat inside no ip redirects ! interface FastEthernet0/1.20 encapsulation dot1Q 20 ip address 172.32.0.1 255.248.0.0 ip nat inside no ip redirects ! ip nat pool Internet 172.16.0.1 172.16.0.1 netmask 255.248.0.0 ip nat inside source list 1 pool Internet overload access-list 1 permit 172.24.0.0 0.7.255.255 access-list 1 permit 172.32.0.0 0.7.255.255 ! ip classless ip route 0.0.0.0 0.0.0.0 172.16.0.1 ! service dhcp ! ip dhcp excluded-address 172.24.0.1 ip dhcp excluded-address 172.32.0.1 ip dhcp excluded-address 172.24.0.2 ip dhcp excluded-address 172.32.0.2 ip dhcp excluded-address 172.24.0.3 ip dhcp excluded-address 172.32.0.3 ip dhcp excluded-address 172.24.0.4 ip dhcp excluded-address 172.32.0.4 ip dhcp excluded-address 172.24.0.5 ip dhcp excluded-address 172.32.0.5 ! ip dhcp pool vlan10 network 172.24.0.0 255.248.0.0 default-router 172.24.0.1 dns-server 208.67.222.222 ! ip dhcp pool vlan20 network 172.32.0.0 255.248.0.0
  • 2.
    default-router 172.32.0.1 dns-server 208.67.222.222 ! ipnat outside source static tcp 172.24.0.1 1812 192.168.42.207 1812 ip nat outside source static udp 172.24.0.1 1812 192.168.42.207 1812 ip nat outside source static tcp 172.24.0.1 1813192.168.42.207 1813 ip nat outside source static udp 172.24.0.1 1813192.168.42.207 1813 Switch aaa new-model username cisco password Cisco radius-server host 172.24.0.1 auth-port 1812 acct-port 1813 key Admin1234 radius-server host 172.32.0.1 auth-port 1812 acct-port 1813 key Admin1234 aaa authentication dot1x default group radius dot1x system-auth-control vlan database vlan 10 vlan 20 exit ! vlan 10 name 172.24.0.0/13 ! vlan 20 name 172.32.0.0/13 ! interface FastEthernet0/1 switchport trunk encapsulation dot1q switchport trunk allowed vlan 1,10,20 switchport mode trunk spanning-tree portfast no cdp enable ! interface FastEthernet0/2 switchport access vlan 10 switchport mode access dot1x port-control auto dot1x guest-vlan 20 dot1x timeout quiet-period 3 dot1x timeout tx-period 15 spanning-tree portfast interface Vlan10 ip address 172.24.0.2 0.7.255.255 ip default-gateway 172.24.0.1 ! interface Vlan20 ip address 172.32.0.2 0.7.255.255 ip default-gateway 172.32.0.1 !