cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2891
Views
5
Helpful
9
Replies

How to ping to my server if i using inter-vlan

Fangerino
Level 1
Level 1

Hi, Can someone help me why i cannot ping to my server. my given network is 10.0.0.0/24 but there will be overlapse for my router C if i use the same subnet so i decided to put 10.0.1.1/24 but still not working I not sure is my OSPF causing the problem or my inter-vlan

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

Hello @Fangerino,

On Router C:

M02rt37_1-1688033249875.png

 

Change the wildcard (third byte in yellow) with .3 instead of .255

Change the last byte (in yellow) of the second network command with .4 instead of .0

Also, why you configure

network 10.0.1.0 0.0.0.255 area 0

. It's the subnet of your Linux server. No OSPF between your server and Router C. Then

network command

in ospf permit to have

 adjencies 

between equipement who 'speak OSFP'.

If you want to advertise in your OSPF the subnet 10.0.1.0/24 then uses

redistribute connected subnets

command in

router ospf 1

 

You will have this:

M02rt37_2-1688033352956.png

 

M02rt37_4-1688033379118.png

 

M02rt37_5-1688033398124.png

On Router B the subnet 10.0.1.0/24 is known by OSPF:

M02rt37_6-1688033452208.png

 

Also in Router A

M02rt37_7-1688033482348.png

 

On RouterA and Router B also adjust OSPF like this:

RouterA:

M02rt37_0-1688034756403.png

 

Router B:

M02rt37_1-1688034769811.png

 

 

Router C will received the different subnet:

M02rt37_2-1688034809753.png

 

And you will ping you Linux server!

M02rt37_3-1688034828423.png

 

 

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

9 Replies 9

Fangerino
Level 1
Level 1

This is my current set up

@Fangerino you need to advertise below networks in router A to OSPF. 

10.0.10.0/24 
10.0.20.0/24 
10.0.30.0/24 
10.0.40.0/24 
10.0.50.0/24 

Please rate this and mark as solution/answer, if this resolved your issue
Good luck
KB

At first i wanted to do that but too much typing xD so i jus went straight with 10.0.0.0

Hi

 For simplicity you can use the following command under ospf

router ospf 1
redistribute 

connect subnets

 

Oh i dk about this

redistribute

thingy thx.

Will check it 

M02@rt37
VIP
VIP

Hello @Fangerino,

On Router C:

M02rt37_1-1688033249875.png

 

Change the wildcard (third byte in yellow) with .3 instead of .255

Change the last byte (in yellow) of the second network command with .4 instead of .0

Also, why you configure

network 10.0.1.0 0.0.0.255 area 0

. It's the subnet of your Linux server. No OSPF between your server and Router C. Then

network command

in ospf permit to have

 adjencies 

between equipement who 'speak OSFP'.

If you want to advertise in your OSPF the subnet 10.0.1.0/24 then uses

redistribute connected subnets

command in

router ospf 1

 

You will have this:

M02rt37_2-1688033352956.png

 

M02rt37_4-1688033379118.png

 

M02rt37_5-1688033398124.png

On Router B the subnet 10.0.1.0/24 is known by OSPF:

M02rt37_6-1688033452208.png

 

Also in Router A

M02rt37_7-1688033482348.png

 

On RouterA and Router B also adjust OSPF like this:

RouterA:

M02rt37_0-1688034756403.png

 

Router B:

M02rt37_1-1688034769811.png

 

 

Router C will received the different subnet:

M02rt37_2-1688034809753.png

 

And you will ping you Linux server!

M02rt37_3-1688034828423.png

 

 

 

 

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

Holy... Ya good qns why did i set .

255 xD

omg that's why i was so worried about the ip over lapses that i overlook the wildcard mask.... Thx alot man appreciate it.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Loaded up your PT file.  What exactly is not working?

Like @Kasun Bandara noted, you have multiple interfaces not included/advertised in OSPF (the five subinterfaces on g0/0/0).

@Flavio Miranda then suggested using the OSPF section command

redistribute connect subnets

, which will, indeed, get connected interfaces placed into OSPF.  However, they will be injected as externals, which, unless that's what you really want them to be, I would advise against doing.

M02@rt37 then follows up on using

redistribute connect subnets

while also changing OSPF network statements masks on Router C, which aren't necessary, although your OSPF network statements, on your routers (plural), I suspect, shows a misunderstanding exactly how the OSPF network statement works.

An OSPF network statement works much like an ACL ACE matching an interface IP.  It has NOTHING to do with what subnet will be advertised.

For example, Router C has 3 interfaces:

interface GigabitEthernet0/0/0
ip address 10.0.1.1 255.255.255.0

interface Serial0/1/0
ip address 10.0.0.2 255.255.255.252

interface Serial0/1/1
ip address 10.0.0.5 255.255.255.252

If I wanted all of those interfaces, in the same area, I could use just this one OSPF network statement:

network 0.0.0.0 255.255.255.255 area 0

Or since all 3 interfaces are in the 10.0.0.0 /23 block, you could also use just this one OSPF network statement:

network 10.0.0.0 0.0.1.255 area 0

If I wanted to make sure I only selected those particular 3 interfaces, I might use the following 3 network statements:

network 10.0.0.2 0.0.0.0 area 0
network 10.0.0.5 0.0.0.0 area 0
network 10.0.1.1 0.0.0.0 area 0

or, BTW, in later IOS OSPF versions, rather than using OSPF section network statements, you can instead do:

interface GigabitEthernet0/0/0
ip address 10.0.1.1 255.255.255.0
ip ospf 1 area 0

interface Serial0/1/0
ip address 10.0.0.2 255.255.255.252
ip ospf 1 area 0

interface Serial0/1/1
ip address 10.0.0.5 255.255.255.252
ip ospf 1 area 0

Since OSPF network statement work like ACL ACEs, sequence and mask used can be important.

For example, all our /23 networks should be in

area 0

but for the interface with address 10.0.0.5 should be in

area 1

, we might do:

network 10.0.0.5 0.0.0.0 area 1
network 10.0.0.0 0.0.1.255 area 0

But, understand, there are other ways to accomplish the above.

Again, what's important to understand, OSPF network statements work like ACL ACEs matching interface IP addresses.  When they find a match, the interface's subnet is determined by the interface's address mask, NOT the OSFP network statement's mask.

BTW, with your original OSPF Router C network statements:

network 10.0.0.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.3 area 0
network 10.0.1.0 0.0.0.255 area 0

Your first and second network statements overlap, which makes the second statement, redundant, but as such, it's not causing any OSPF issue, although it can make one wonder why it's there.  Just as using a /24 mask for the two /252 networks does.  I.e. following the scheme you seem to be using, using OSPF network masks to (needlessly) match the interface's mask, I would expect what M02@rt37 suggested:

network 10.0.0.0 0.0.0.3 area 0
network 10.0.0.4 0.0.0.3 area 0
network 10.0.1.0 0.0.0.255 area 0

But, I would recommend against this scheme.  In my experience, it's too easy to get it wrong.  I suggest you either match individual interface IPs (as shown) above, or you match IP address blocks intended to be in specific OSPF areas, also shown above.  You can mix and match, for special needs, as also shown above.  Personally, my OSPG network statement goals include brevity and clarity for what's intended.

As an example, in one large Enterprise I worked at, each 10.0.0.0/16 was related to the same numbered OSPF area.  So, every area 4 router had: 

network 10.4.0.0 0.0.255.255 area 4

.  (With a /16 per area, we didn't expect to run out of IPs within the area, and with 256 /16s, we didn't expected to run out of /16s either.  This also lent itself to summarize an area's IPs, to the core, as just the single /16 address block.)

I strongly suggest, you try some experimentation, with the above, in your PT lab.  For example, you might first try replacing each router's OSPF network statements with just network 0.0.0.0

255.255.255.255 area 0

; also remove the 

redistribute

connect subnets.

Lastly, another useful show command is (e.g. from Router A): 

 

 

 

 

 

 

Router>show ip ospf interface brief 
Interface     PID   Area                     IP Address/Mask          Cost  State  Nbrs F/C
Gig             1   0.0.0.0                  10.0.10.1/255.255.255.0   1       DR  0/0
Gig             1   0.0.0.0                  10.0.20.1/255.255.255.0   1       DR  0/0
Gig             1   0.0.0.0                  10.0.30.1/255.255.255.0   1       DR  0/0
Gig             1   0.0.0.0                  10.0.40.1/255.255.255.0   1       DR  0/0
Gig             1   0.0.0.0                  10.0.50.1/255.255.255.0   1       DR  0/0
Se0/1/1         1   0.0.0.0                10.0.0.10/255.255.255.252   64   POINT  0/0
Se0/1/0         1   0.0.0.0                 10.0.0.1/255.255.255.252   64   POINT  0/0

 

 

 

 

 

 

 

 

 

I got the above result after adding (on Router A):

router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 10.0.0.0 0.0.0.255 area 0
network 10.0.0.0 0.0.0.3 area 0
network 10.0.1.0 0.0.0.255 area 0

network 0.0.0.0 255.255.255.255 area 0

The newly added network statement, besides adding the five previously subinterfaces, makes the other network statements redundant (needless) and doesn't required

redistribution

of connected interfaces.

Review Cisco Networking for a $25 gift card