cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
561
Views
0
Helpful
1
Replies

Static IP and NAT on the same router's 'inside' port

peterdabr
Level 1
Level 1

I have 831 router with eth1 WAN port (connected to ADSL modem) and eth0 (virtual interface for computers connected to the router's built-in hub).

Can I assign to eth1 and eth0 on the router and to servers connected to the router's hub static IPs from the same subnet so my servers on the inside can see the internet?(for example eht1-50.50.50.1 eth0-50.50.50.2 and 2 servers connected to router's hub - 50.50.50.3 and .4)

Also I have few client computers that need to receive dynamic IP from DHCP and use NAT for them to communicate with Internet. So my second question would be: can I set eth0 on the router to use static IP (for connection to the servers with also static IPs) and have the same eth0 interface with IP 192.160.0.1 to serve as DHCP and NAT for DHCP clients on my network. IN other words can I assign two IP addresses to the eth0?

Thank you for any help,

Peter

1 Reply 1

marinos_g
Level 1
Level 1

Hi Peter,

I've never really configured an 831 router, but I don't think it will be any different from the rest Cisco routers.

You can assign two IP addresses on an interface using the following command:

interface eth0

ip address 50.50.50.1 255.255.255.0

ip address 192.168.0.1 255.255.255.0 secondary

I guess this command will work on the 831 as well as the others.

As for your first question, If you use the same subnet for interface eth0 and interface eth1, you would have to use bridging instead of routing.

You use this router to connect to internet. You need all the PCs - servers from the LAN to go outside to internet.

To do this you need a public IP address for your internet interface (eth1) and a private IP address for your LAN interface (eth0).

What you need to do next is NAT.

interface eth1

ip address 50.50.50.1 255.255.255.248

ip nat outside

interface eth0

ip address 192.168.0.1 255.255.255.0

ip nat inside

ip nat inside source list 100 interface Ethernet1 overload

access-list 100 permit ip 192.168.0.0 0.0.0.255 any

This will get your LAN to internet.

If you want a server at your LAN to be accessed from the internet, you need to use static NAT to a specific public IP address.

ip nat inside source static 192.168.0.10 50.50.50.2

Finally, if you need a DHCP server, the router can be configued as one:

ip dhcp excluded-address 192.168.0.1

!

ip dhcp pool DHCPPOOL

network 192.168.0.0 255.255.255.0

default-router 192.168.0.1

dns-server x.x.x.x

lease 3

!

ip local pool DHCPPOOL 192.168.0.2 192.168.0.254

I hope I helped you with this.

Marinos

Review Cisco Networking for a $25 gift card