search the web

Sunday, November 22, 2015

Configuring OSPF

Configuring OSPF

-----------------
Wild card mask= 0 means match and 255 mean dont care

255.255.255.255
-
255.255.255.0 [subnet mask]
---------------------------
0.0.0.255 [The result of this is the wild card mask]

-------------
R1
-------------
conf t
!loop back interfaces are logical interfaces that you configure manually and they are up all the time. Used for OSPF router-id.

int loop 0
ip address 10.50.0.1 255.255.255.0
no shut
exit
int loop 1
ip address 10.50.1.1 255.255.255.0
no shut
exit
int loop 2
ip address 10.50.2.1 255.255.255.0
no shut
exit
int loop 3
ip address 10.50.3.1 255.255.255.0
no shut
exit
int loop 4
ip address 10.50.4.1 255.255.255.0
no shut
exit
int loop 5
ip address 10.50.5.1 255.255.255.0
no shut
exit
int loop 6
ip address 10.50.6.1 255.255.255.0
no shut
exit
int loop 7
ip address 10.50.7.1 255.255.255.0
no shut
exit

do show ip route
!note the connencted networks

router ospf 1

!this command enables OSPF with process-id of 1. The process id only identifies the OSPF process. It is like applicatons running in windows with a process id visible in taskmanager.

route-id 1.1.1.1
!This manually assings a router-id to the router as 1.1.1.1


network 192.168.10.0 0.0.0.255 area 0
!This will enable ospf on the interface which has a network id of 192.168.10.0 and will put that interface in area 0
OR
network 192.168.0.0 0.0.255.255 area 0
!This will enable ospf on all those interfaces which has 192.168 common and will put them in area 0.
-------------------------
10.50.00000001.00000000
10.50.00000111.00000000
-----------------------
10.50.0.0/21
/21=255.255.248.0
wildcard mask
255.255.255.255
255.255.248.0
---------------
0.0.7.255
-------------------------

network 10.50.0.0 0.0.7.255 area 1
!This one command will advertise the whole list from 1050.0.0-1050.7.0

-------------------------
BB
------------------------
show ip route
conf t
router ospf 1
router-id 5.5.5.5
network 192.168.0.0 0.0.255.255 area 0
OR
network 192.168.10.0 0.0.0.255 area 0
network 192.168.30.0 0.0.0.255 area 0

exit


-------------------------
R3
-------------------------
show ip route
conf t
router ospf 1
network 192.168.30.0 0.0.0.255 area 0
netowrk 192.168.0.0 0.0.0.255 area 0
exit


--------------------------
R2
--------------------------
show ip route
conf t
router ospf 1
network 192.168.0.0 0.0.0.255 area 0
exit


ROUTE-SUMMARIZATION ON ROUTER 1
conf t
router ospf 1
area 1 range 10.50.0.0 255.255.248.0
!This command will summarize the routes.


show ip ospf neighbors
!shows the neighbor table
show ip ospf database
!shows the topology table

show ip route
!shows the routing table.



Thanks for visiting if there is any doubt or question about OSPF (Open Shortest Path First) please write down in comments

for initial configuration of Router, switch or AP visit link below

initial configuration of Router, Switch or AP

Monday, November 16, 2015

Configuring NAT

Configuring NAT

1.Identify the network to be translated
2.Add a default static route pointing to your ISP router
3.Label the interfaces ( And the label has an affect on the interfaces )
4.Apply ip nat command

R3
show ip route
conf t
access-list 1 permit 192.168.0.0 0.0.255.255
!through this we have allowed any network starting from 192.168. to be translated to the internet

ip route 0.0.0.0 0.0.0.0 192.168.1.1

ip name-server 4.2.2.2
!This command assigns a dns server addressexit
ping 192.168.1.1
conf t

ping google.com

ip domain-lookup
!enables dns lookup


interface e0
ip nat outside
exit
interface s0
ip nat inside
exit
!we have labled the interfaces and it will affect them as well.

ip nat inside source list 1 interface e0 overload
!please nat the addresses mentioned in the source list 1 and overload them on outside interface e0.

R1
conf t
access-list 1 permit 192.168.0.0 0.0.255.255
ip route 0.0.0.0 0.0.0.0 192.168.100.2
int s1/0
ip nat outside
exit
int e0/0
ip nat inside
exit
ip nat inside source list 1 interface s1/0 overload
i want to nat the addresses mentioned in source list 1 and please overload them on outside interface which is s1/0
exit


STATIC NAT ON R3
we want to map 192.168.1.12 to our R2's ip address 192.168.100.1. Any traffic coming to 192.168.1.12 will be sent to 192.168.100.1
first we label the R3's interface s1 which is connected to R2

conf t
int s1
ip nat inside
exit

ip nat inside source static 192.168.200.1 192.168.1.12
Please statically map the inside local address 192.168.200.1 to the inside global address 192.168.1.12.


PORT MAPPING
ip nat inside source static tcp 192.168.200.1 23 192.168.1.11 23
This command statically maps the port 23 of 192.168.1.11 to the port 23 of R2 192.168.200.1

DYNAMIC NAT
R3
show ip route
conf t
access-list 1 permit 192.168.0.0 0.0.255.255
!through this we have allowed any network starting from 192.168. to be translated to the internet

ip route 0.0.0.0 0.0.0.0 192.168.1.1

ip name-server 4.2.2.2
!This command assigns a dns server addressexit
ping 192.168.1.1
conf t

ping google.com

ip domain-lookup
!enables dns lookup


interface e0
ip nat outside
exit
interface s0
ip nat inside
exit
!we have labled the interfaces and it will affect them as well.
ip nat pool PUBADD 192.168.1.11 192.168.1.15 netmask 255.255.255.0
!We have created a pool of public address by name of PUBADD.

ip nat inside source list 1 pool PUBADD overload

!please nat the addresses mentioned in the source list 1 and overload them on outside pool of address which PUBADD.


Thanks for visiting if there is any doubt or question about NAT (Network Adress Translation) please write down in comments

for initial configuration of Router, switch or AP visit link below

initial configuration of Router, Switch or AP

Monday, November 9, 2015

Configuring INter-vlan Routing

Configure INter-vlan Routing


Configure the Switchpot as trunk

WC_S1
conf t
interface fa0/21
switchport mode trunk
exit

-------------------------------
R3
------------------------------
conf t
interface e0/0
ip address 192.168.0.1 255.255.255.0
no shut
exit
interface e0/0.10
encapsulation dot1q 10
!means the trunking protocol will be dot 1q and vlan 10 will able to access it
ip address 192.168.100.1 255.255.255.0
no shut
exit
interface e0/0.20
encapsulation dot1q 20
ip address 192.168.200.1 255.255.255.0
no shut
exit

for initial configuration of Router, switch or AP visit link below
initial configuration of Router, Switch or AP