Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Example 4-13 Mazatlan Is Configured to Dynamically Assign IG Addresses from an

Address Pool

interface Ethernet0
ip address 10.1.1.1 255.255.255.0
ip nat inside
!
interface Serial1
no ip address
encapsulation frame-relay
!
interface Serial1.705 point-to-point
ip address 199.100.35.254 255.255.255.252
ip nat outside
frame-relay interface-dlci 705
!
router ospf 100
network 10.1.1.1 0.0.0.0 area 0
default-information originate
!
ip nat pool PoolOne 204.15.86.1 204.15.86.254 netmask 255.255.255.0
ip nat pool PoolTwo 204.15.87.1 204.15.87.253 netmask 255.255.255.0
ip nat inside source list 1 pool PoolOne
ip nat inside source list 2 pool PoolTwo
ip nat inside source static 10.1.1.254 204.15.87.254
!
ip route 0.0.0.0 0.0.0.0 199.100.35.253
!
access-list 1 permit 10.1.1.0 0.0.0.255
access-list 2 permit 10.1.2.0 0.0.0.255
!

Two pools are created, named PoolOne and PoolTwo. PoolOne is assigned an address
range of 204.15.86.1–204.15.86.254. PoolTwo is assigned an address range of
204.15.87.1–204.15.87.253. Notice that the address ranges exclude the network addresses
and the broadcast addresses; the netmask portion of the commands acts as a sanity
check, ensuring that such addresses as 204.15.87.255 are not mapped. An alternative to
using the netmask keyword is the prefix-length. For example:

ip nat pool PoolTwo 204.15.87.1 204.15.87.253 prefix-length 24


has the same effect as the command with the netmask 255.255.255.0 keyword. Because
of these commands, you can assign a range such as 204.15.86.0–204.15.86.255, and the
"0" and "255" host addresses will not be mapped. However, it is good practice to
configure only the actual pool addresses to avoid confusion.

You might also like