Adresacja:
G0/0 - siec lokalna 192.168.1.1/24
G0/1 - WAN 192.168.222.4/24 na 192.168.222.1 jest router z Internetem
Ustawiłem routing 0.0.0.0 0.0.0.0 192.168.1.1 i z poziomu routera jest dostęp do Internetu, ale na interfejsie G0/1 już nie. Ponadto skonfigurowalem NAT, poniżej konfiguracja.
Kod: Zaznacz cały
Building configuration...
Current configuration : 1611 bytes
!
! Last configuration change at 13:57:50 UTC Fri Mar 4 2016
! NVRAM config last updated at 13:23:16 UTC Fri Mar 4 2016
! NVRAM config last updated at 13:23:16 UTC Fri Mar 4 2016
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
! card type command needed for slot/vwic-slot 0/0
enable secret 5 $1$ZSKP$kPfsHRN4kRRrNm3Dpyqwu1
!
no aaa new-model
!
no ipv6 cef
!
!
!
!
!
ip cef
multilink bundle-name authenticated
!
crypto pki token default removal timeout 0
!
!
license udi pid CISCO1921/K9 sn FCZ15477053
!
!
!
!
!
!
!
!
interface Embedded-Service-Engine0/0
no ip address
shutdown
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip virtual-reassembly in
duplex auto
speed auto
!
interface GigabitEthernet0/1
ip address 192.168.222.4 255.255.255.0
ip nat outside
ip virtual-reassembly in
duplex auto
speed auto
!
ip default-gateway 192.168.222.1
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
ip nat inside source list LAN interface GigabitEthernet0/0 overload
ip route 0.0.0.0 0.0.0.0 192.168.222.1
!
ip access-list extended LAN
permit ip 192.168.1.0 0.0.0.255 any
!
!
!
!
control-plane
!
!
!
line con 0
line aux 0
line 2
no activation-character
no exec
transport preferred none
transport input all
transport output pad telnet rlogin lapb-ta mop udptn v120 ssh
stopbits 1
line vty 0 2
password cisco
login
transport input all
line vty 3 4
login
transport input all
!
scheduler allocate 20000 1000
end