LinuxQuestions.org
Help answer threads with 0 replies.
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 05-17-2016, 08:37 AM   #1
captainfreek
LQ Newbie
 
Registered: May 2016
Distribution: Slackware,Ubuntu,Debain,FreeBSD
Posts: 10

Rep: Reputation: Disabled
Adding Multiple IP address in one nic [Ubuntu14.04]


Hi I am new to linux world I am facing difficulty in adding IP's in the nic
I have one nic that I connect my Internet with pppoe my lan card has 2 rj45 ports but only in one port i connect so how can I place some pvt ip that is 10.1.xxx.xxx with netmask xxx.xxx.xxx.xxx in my lan card though I tried placig it in interference but it was not at all comming up even after reboot so some one who can help me out in this I want to ping switches ad routers in LAN via some script or etc that is futher part if some one can still help me with this
Thanks in advance
 
Old 05-17-2016, 05:35 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,887

Rep: Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615
It would depend on the model and make of the ethernet card. If you have one of them working then we might assume that eth0 has some address. If you have the network manager then you could use it or possible use command line to establish the IP/subnet/gateway. To make it available on reboot then you'd have to edit a few files maybe.

Tell us the make of the network adapter. Usually some entry in the command lspci should show it. I'd suspect that the second port should be available for use in most common adapters.
 
Old 05-27-2016, 09:12 AM   #3
captainfreek
LQ Newbie
 
Registered: May 2016
Distribution: Slackware,Ubuntu,Debain,FreeBSD
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
It would depend on the model and make of the ethernet card. If you have one of them working then we might assume that eth0 has some address. If you have the network manager then you could use it or possible use command line to establish the IP/subnet/gateway. To make it available on reboot then you'd have to edit a few files maybe.

Tell us the make of the network adapter. Usually some entry in the command lspci should show it. I'd suspect that the second port should be available for use in most common adapters.
Yes i eth0 having address but what happens is when i connect pppoe(client) from gui the private IP doest connect if i disconnect pppoe and when i connect eth0
it connects I wat the pvt ip's to be connected when pppoe connects so i can browse as well as pvt ip's i rage 10.xxx.xxx.xxx
so how that can be done in pppoe or any other way that INTERNET remains with pppoe but also connects and ping to pvt ip's ?
 
Old 05-29-2016, 05:28 AM   #4
captainfreek
LQ Newbie
 
Registered: May 2016
Distribution: Slackware,Ubuntu,Debain,FreeBSD
Posts: 10

Original Poster
Rep: Reputation: Disabled
When i connect to pppoe I am not able to ping the pvt ip from other machine I want it to ping it when pppoe connects can some get anyhelp or any idea how ca it be doe ?
 
Old 05-30-2016, 12:48 AM   #5
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
please post the output from the following command using [ code ] tags.

Code:
ifconfig -a
 
Old 07-19-2016, 09:03 AM   #6
captainfreek
LQ Newbie
 
Registered: May 2016
Distribution: Slackware,Ubuntu,Debain,FreeBSD
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lazydog View Post
please post the output from the following command using [ code ] tags.

Code:
ifconfig -a
ifconfig -a
eth0 Link encap:Ethernet HWaddr fc:aa:14:64:0f:a6
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 00:15:17:73:3a:aa
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:16 Memory:f7d80000-f7da0000

eth2 Link encap:Ethernet HWaddr 00:15:17:73:3a:ab
inet addr:xxx.x.xx.xxx Bcast:xxx.x.xx.xxx Mask:xxx.xxx.xxx.xxx
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10440940 errors:0 dropped:3891468 overruns:0 frame:0
TX packets:1291321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3700431605 (3.7 GB) TX bytes:99980997 (99.9 MB)
Interrupt:17 Memory:f7d20000-f7d40000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:12590 errors:0 dropped:0 overruns:0 frame:0
TX packets:12590 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1464699 (1.4 MB) TX bytes:1464699 (1.4 MB)
 
Old 07-19-2016, 02:33 PM   #7
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Coonect up all your interfaces as to how you would like them to be connected and then run
Code:
route -n
 
Old 08-04-2016, 09:22 PM   #8
captainfreek
LQ Newbie
 
Registered: May 2016
Distribution: Slackware,Ubuntu,Debain,FreeBSD
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lazydog View Post
Coonect up all your interfaces as to how you would like them to be connected and then run
Code:
route -n
Sorry to ask you can you give me one eg with eht2 though pppoe is conected (dialed)
 
  


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
Assign different/multiple IP address to NIC network card hack3rcon Linux - Networking 1 11-05-2015 07:29 AM
Multiple IP address on a single NIC mosharaf_linux Linux - Server 1 01-20-2011 09:20 AM
Multiple IP address/gateways single nic 1192bo Linux - Networking 2 11-15-2005 08:51 AM
Adding multiple static IPs to one NIC digihlp Linux - Networking 2 06-26-2003 08:13 PM

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

All times are GMT -5. The time now is 09:24 PM.

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