LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-18-2015, 11:09 AM   #16
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477

There is something seriously wrong, why eth4 showing the IP address of eth3? Run the following commands and paste the output:

1.
Code:
lspci | grep net
2.
Code:
route -n
3.
Code:
ifconfig -a
4.
Code:
service NetworkManager status
5.
Code:
service network status
6.
Code:
chkconfig --list | egrep '(network)|(NetworkManager)'
7.
Code:
ls -al /etc/sysconfig/network-scripts/ | grep ifcfg
If for security reasons you want to mask the IP just change the first octet. I mean if you are using 192. then you can change it to 10. or 172. Please do not change the subnet mask or anything else as it might be more confusing for me.
 
1 members found this post helpful.
Old 03-18-2015, 10:41 PM   #17
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Cool output

lspci | grep net - no output

but lspci only have this:

Quote:
[vmx@xvmm01 root]# lspci
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA
ifconfig -a have this: (eth3 and eth4 is on different subnet)

eth3 192.168.1.X subnet
eth4 192.168.2.X subnet

Quote:
[vmx@xvmm01 ~]$ ip addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever

2: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:17:5c:7d:13:ee brd ff:ff:ff:ff:ff:ff
inet 192.168.1.24/24 brd 192.168.1.255 scope global eth3
valid_lft forever preferred_lft forever

3: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:17:7d:7d:1a:21 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.24/24 brd 192.168.1.255 scope global eth4
inet 192.168.2.120/24 brd 192.168.2.255 scope global eth4
valid_lft forever preferred_lft forever

service NetworkManager status
Quote:
[vmx@xvmm01 ~]# service NetworkManager status
NetworkManager (pid 1243) is running...
service network status

Quote:
[vmx@xvmm01 ~]# service network status
Configured devices:
lo eth0
Currently active devices:
lo eth3 eth4
 
Old 03-18-2015, 10:43 PM   #18
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Cool

ls -al /etc/sysconfig/network-scripts/ | grep ifcfg

Quote:
[vmx@xvmm01 ]# ls -al /etc/sysconfig/network-scripts/ | grep ifcfg
-rw-r--r--. 3 root root 437 Mar 18 16:59 ifcfg-eth0
-rw-r--r--. 1 root root 254 Oct 10 2013 ifcfg-lo
Thanks for your help.
 
Old 03-18-2015, 10:45 PM   #19
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
chkconfig --list output change : to = cannot post

Quote:
chkconfig --list | egrep '(network)|(NetworkManager)'
NetworkManager 0=off 1=off 2=on 3=on 4=on 5=on 6=off
network 0=off 1=off 2=on 3=on 4=on 5=on 6=off
 
Old 03-18-2015, 11:39 PM   #20
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
1. vi /etc/sysconfig/network-scripts/ifcfg-eth1 and put the following contents:
Code:
DEVICE=eth4
BOOTPROTO=dhcp
ONBOOT=yes
IPV6INIT=no
USERCTL=yes
2. Turn off NetworkManager using the following command:
Code:
chkconfig NetworkManager off
Also, share the output of the route -n as requested in previous post and:

Code:
cat /etc/sysconfig/network-scripts/ifcfg-eth0
 
Old 03-19-2015, 12:06 AM   #21
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
route -n

Quote:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth3
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth4
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth3
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth4
 
Old 03-19-2015, 12:07 AM   #22
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Alright. Looks good. Did you try the steps mentioned in previous post and restarted the network?
 
Old 03-19-2015, 12:27 AM   #23
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Wow you save my day.. +++T3RM1NVTOR

Thank you very much..

As per your suggestion i turned off NetworkManager and created below files:

-created ifcfg-eth1 with device set to eth4
-created also ifcfg-eth2 with device set to eth3
The default settings of ifcfg-eth0 i never do anything i just leave the default config.


and reboot the VM works like magic...

route -n shows this one, below no more 192.168.2.1 gateway but the subnet still accessible using the 192.168.1.1 gateway..

Quote:
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth3
192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth4
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth4
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth3
Maybe I can conclude that NetworkManager could be messing up.

And the ifconfig should be set in sequence like ifcfg-eth0 then ifcfg-eth1 then ifcfg-eth2 and so on..

Yes everything works fine now..Thank you buddy..
 
Old 03-19-2015, 12:34 AM   #24
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Thumbs up

You're welcome.

Good to hear that everything works fine now.

Yes, when making configuration change via files it is better to keep NetworkManager off. As I mentioned earlier NetworkManager is a legacy tool. It is there for the people who are new to Linux to give gui / tui access in order to setup the network.

NetworkManager has got drawbacks as well for example you cannot configure alias IP on the interface with NetworkManager running. It simply mess it up.
 
Old 03-19-2015, 12:38 AM   #25
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Cool

Quote:
Originally Posted by T3RM1NVT0R View Post
You're welcome.

Good to hear that everything works fine now.

Yes, when making configuration change via files it is better to keep NetworkManager off. As I mentioned earlier NetworkManager is a legacy tool. It is there for the people who are new to Linux to give gui / tui access in order to setup the network.

NetworkManager has got drawbacks as well for example you cannot configure alias IP on the interface with NetworkManager running. It simply mess it up.
Yes, thank you. Command line works great..but of course need to know what to type..hehehe...
 
Old 03-19-2015, 12:39 AM   #26
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You're welcome. Yup that is true
 
Old 03-19-2015, 12:43 AM   #27
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,160

Original Poster
Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
There was an issue also the fstab was not mounting a windows share.

But I guess it was the network issue also; when the OS try to mount but the network was not yet connected so it fails.

But now everything works as expected..

T3RM1NVT0R Thank you..
 
  


Reply

Tags
centos, networking



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
DHCP on wired interface only sometimes working, always working on wireless interface PasBern Linux - Networking 5 06-26-2014 02:36 PM
Create a sub interface with dhcp custangro Linux - Networking 9 04-26-2010 05:06 PM
ATT Uverse DHCP Not Assigning to Red Interface Interface on Smoothwall barleykorn Linux - Networking 2 02-14-2010 05:12 PM
DHCP on CentOS 4.7 - /var/lib/dhcp/dhcpd.leases: Permission denied Latitude Linux - Networking 1 06-05-2009 02:08 AM
interface ok, dhcp ok, routing gw not ok- help sokar Linux - Wireless Networking 4 02-04-2004 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:01 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
Open Source Consulting | Domain Registration