2

i have this simple diagram below: enter image description here

I need to make 192.168.55.1 talk with 10.0.2.59 by open the interface 0/1 [192.168.56.254]

by talk mean what is router commands required to open new interface and make the ip route ONLY route the 2 endpoints? let me say it in other words:the ip "192.168.55.1" should only ping/reach "10.0.2.59". if it try to ping any other host it should fail to reach it.

please provide the commands set ASAP. and excuse me if i used wrong terms to describe the requirements but it's been over 6 years since the last time i used to config routers.

2 Answers 2

4

Do you have any routing setup already between the boxes?

You could do the following..

Router 1(left Side of diagram)

interface FastEthernet0/1
  ip address 192.168.56.253 255.255.255.252
  no shut 

ip route 192.168.55.1 255.255.255.255 192.168.56.254 

Router 2(right side)

interface FastEthernet0/1
   ip address 192.168.56.254 255.255.255.252
   no shut 

ip route 192.168.2.59 255.255.255.255 192.168.56.253 

Or you could just build the routes between them for the native subnets, and apply an access list between them (Which is probably the better solution if you expect more hosts to need to talk across

This examples assumes no access list 101, and /24 networks.

Router 1(left Side of diagram)

interface FastEthernet0/1
  ip address 192.168.56.253 255.255.255.252
  ip access-group 101 in 
  no shut 

ip route 192.168.55.0 255.255.255.0 192.168.56.254 
ip access-list 101 permit 192.168.55.1 255.255.255.255 192.168.2.59 255.255.255.255 
ip access-list 101 deny any any 

Router 2(right side)

interface FastEthernet0/1
   ip address 192.168.56.254 255.255.255.252
   ip access-group 101 in 
   no shut 

ip route 192.168.2.0 255.255.255.0 192.168.56.253 
ip access-list 101 permit 192.168.2.59 255.255.255.255 192.168.55.1 255.255.255.255 
ip access-list 101 deny any any 
2

Here are commands - First of all you must enter in "enable" mode:

Router>enable

Router#

now enter in global configuration mode:

Router#config t

Router(config)#

Then you must configure interface:

Router(config)#interface (fastethernet, serial) 0/1 \ You didnt specificy which type of interface connects routers. Is this FastEthernet, Serial, Ethrnet...

Router(config-if)#ip address 192.168.56.254 255.255.255.0 \ this command configure ip address for interface, also You didnt specificy subnet mask

Router(config-if)#no shutdown \ power up (enable) interface

It is time to add route for network 10.0.2.0

Router(config-if)#exit \exiting from interface configuration to global config mode

Router(config)#ip route 10.0.2.0 255.255.255.0 192.168.56.253 \ this means, all packet destinated for 10.0.2.0 forward to 192.168.56.253

Router(config)#end \exit from global config mode

Router#wr \ write running configuration to startup

I hope this was helpful. Please provide more information, such as subnet masks, type of interface and so on, then I will send You access list for last requirement - pinging/reaching only specific host.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .