LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-16-2016, 01:50 AM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 423

Rep: Reputation: 0
Unhappy Getting in in Linux networking.


Hello Linux Guru's,

It seems I have screwed up my routing table and need help to resolve it at the same time gain more understanding of the issue or where I stuffed up.
First I give details of agent1(Fedora22) which is able to do ssh to Ubuntu and later details of CentOS 67 which is not able to do ssh to Ubuntu.

both have port 22 open.
working node agent1
[root@agent1 ~]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 enp0s3
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s3
192.168.99.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
192.168.99.0 0.0.0.0 255.255.255.0 U 0 0 0 enp0s8
[root@agent1 ~]#

[root@agent1 ~]# traceroute puppet
traceroute to puppet (192.168.1.7), 30 hops max, 60 byte packets
1 puppet (192.168.1.7) 0.300 ms 0.207 ms 0.151 ms
[root@agent1 ~]#

Agent2 non working node

[root@agent2 Downloads]# netstat -nr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
[root@agent2 Downloads]#
root@agent2 Downloads]# traceroute puppet
traceroute to puppet (192.168.1.7), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 *^C
[root@agent2 Downloads]#

It doesn't come even after 30 hops !

I think this is an interesting exercise to learn linux networking !!

Hope to learn soon.
 
Old 05-17-2016, 12:42 AM   #2
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Northern Half of Florida
Distribution: PCLinuxOS on one home machine, Debian Buster on the other. I forget what's on the laptops.
Posts: 146

Rep: Reputation: 28
It's likely this won't solve your problem (because I'm no expert and came here tonight with a problem of my own) but hopefully it will help or at least point in a useful direction.

The working machine
Code:
Destination   Gateway        Genmask         Flags   MSS   Window   irtt   Iface
0.0.0.0       192.168.1.1    0.0.0.0         UG      0     0        0      enp0s3
192.168.1.0   0.0.0.0        255.255.255.0   U       0     0        0      enp0s3
192.168.99.0  0.0.0.0        255.255.255.0   U       0     0        0      enp0s8
192.168.99.0  0.0.0.0        255.255.255.0   U       0     0        0      enp0s8
So you clearly have two "up" interfaces, enp0s3 and enp0s8. Why enp0s8 has two entries that are identical, I don't understand. Obviously doesn't hurt anything.


The second (nonworking) machine has a 169.254 destination in the routing table. An address in that subnet would be an autoconf address, usually a "guess" by the system at what it hopes will be an available, usable address. It implies the system detects a link at the physical and data link layers but isn't able to locate a DHCP server at the network layer. I'd be interested in the output of "ifconfig eth0" on that machine.

Code:
Destination   Gateway      Genmask         Flags   MSS   Window    irtt    Iface
192.168.1.0   0.0.0.0      255.255.255.0   U       0     0         0       eth0
169.254.0.0   0.0.0.0      255.255.0.0     U       0     0         0       eth0
0.0.0.0       192.168.1.1  0.0.0.0         UG      0     0         0       eth0
That 169.254 just doesn't belong, unless the address you have on eth0 is a 169.254 address. I am not certain of the exact command but I believe something along the lines of "route del 169.254.0.0 eth0" or "route del 169.254.0.0" will remove it.

The line indicating a route to 0.0.0.0 indicates eth0 is the default interface and 192.168.1.1 is the default gateway, which is good, and the line indicating a route to 192.168.1.0 is good.

I'd try deleting that autoconf route and see where it gets you.

Also, I would like to suggest it would be easier to read the terminal output if you include "code" tags around it... that will keep tables like these lined up nicely so the parsing is much easier. Otherwise the numbers jumble up to tired sleep-deprived eyes and make it hard to see where one address ends and the next one starts

Good Luck... Let us know how you get on...



CJ

Last edited by CJ Chitwood; 05-17-2016 at 12:43 AM.
 
Old 05-17-2016, 09:35 AM   #3
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,242
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Can you post the output from ifconfig for both working and none working machine?
 
Old 05-18-2016, 05:46 PM   #4
pingu_penguin
Member
 
Registered: Aug 2004
Distribution: Manjaro Linux
Posts: 284

Rep: Reputation: 56
The second machine - agent2 / Centos 67 has not received a IP or has lost its ip (by trying to obtain one from the dhcp server) for eth0.

It's evident from the fact that its recieved a 169.254.x.x ip , thats a IP your system assigns when it fails to receive ip via dhcp.
 
Old 05-24-2016, 08:54 PM   #5
sysmicuser
Member
 
Registered: Mar 2010
Posts: 423

Original Poster
Rep: Reputation: 0
Guys

Many thanks ! I had no time to figure it out so I gave up by deleting that virtual machine and creating a new one.

I definitely think messed up with iptables...

Anyway all good now.

Linux networking is very interesting !

Cheers to Linux OS !!
 
Old 05-24-2016, 09:22 PM   #6
CJ Chitwood
Member
 
Registered: Dec 2006
Location: Northern Half of Florida
Distribution: PCLinuxOS on one home machine, Debian Buster on the other. I forget what's on the laptops.
Posts: 146

Rep: Reputation: 28
Networking is networking. Linux, BSD, Unix, windows, android... they all use the same seven layer OSI model.

Either way, glad you got it worked out!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is linux networking like windows networking in setting up a small office network? boondox Linux - Networking 6 01-26-2012 07:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration