How to configure the cisco router WAN and LAN interface with internet access
Network connection diagram of below configuration
Interface IP Configuration:
Step: 1
Login into the router with global configuration mode
Router(config)#
Step: 2
Here I’m going to configure WAN interface of the router with ISP public IP address.
WAN IP : 192.168.1.200
WAN Subnet : 255.255.255.0
GATEWAY : 192.168.1.1
WAN Interface Name : FastEthernet0/0
Router(config)#interface FastEthernet 0/0 Router(config-if)#ip address 192.168.1.200 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit
Step: 3
Now I’m going to configure the LAN interface of the router
LAN IP : 10.10.10 1
WAN Subnet : 255.255.255.0
LAN Interface Name : FastEthernet0/0
Router(config)#interface gigabitEthernet 1/0 Router(config-if)#ip address 10.10.10.1 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit
NAT Configuration for Internet access from WAN interface to LAN interface:
Step 4:
Enable outside NAT into the WAN interface(FastEthernet 0/0) of the router
Router(config)#interface fastethernet 0/0 Router(config-if)#ip nat outside Router(config-if)#exit
Step 5:
Enable inside NAT into the LAN interface(GigabitEthernet 1/0) of the router.
Router(config)#interface Gigabitethernet 1/0 Router(config-if)#ip nat inside
Create an access list for allowing LAN interface IP to WAN interface:
Step 6:
create an access list for LAN IP subnet of the router (10.10.10.0/24)
Router(config)#access-list 100 permit ip 10.10.10.0 0.0.0.255 any Router(config)#ip nat inside source list 100 interface fastEthernet 0/0
Note:
100 is the access list
Final step creating a default route for the router:
Step 7:
create a default route for accessing the internet
Router(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1
Note:
192.168.1.1 this it is the gateway of ISP
Step 8 :
Check the internet connectivity in the router
Router#ping 8.8.8.8
the same test you check in the PC( before that configure static IP address into PC Local area connection interface due to DHCP server is not enabled in the router)
Please let me know if you have any doubts.
Good Post my friend