LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-25-2016, 07:45 AM   #1
Bashed
Member
 
Registered: Jul 2015
Posts: 133

Rep: Reputation: Disabled
IPs Ping but missing from IFCONFIG


I ran a script below to route 20 x /24 subnets for VPN use.

Code:
for i in $(seq 2 254);
        do ip addr add xxx.xxx.3.$i/24 dev em1
        ip addr add xxx.xxx.58.$i/24 dev em1
        ip addr add xxx.xxx.65.$i/24 dev em1
        ip addr add xxx.xxx.80.$i/24 dev em1
        ip addr add xxx.xxx.90.$i/24 dev em1
        ip addr add xxx.xxx.21.$i/24 dev em1
        ip addr add xxx.xxx.31.$i/24 dev em1
        ip addr add xxx.xxx.30.$i/24 dev em1
        ip addr add xxx.xxx.40.$i/24 dev em1
        ip addr add xxx.xxx.50.$i/24 dev em1
        ip addr add xxx.xxx.60.$i/24 dev em1
        ip addr add xxx.xxx.70.$i/24 dev em1
        ip addr add xxx.xxx.81.$i/24 dev em1
        ip addr add xxx.xxx.1.$i/24 dev em1
        ip addr add xxx.xxx.6.$i/24 dev em1
        ip addr add xxx.xxx.16.$i/24 dev em1
        ip addr add xxx.xxx.17.$i/24 dev em1
        ip addr add xxx.xxx.29.$i/24 dev em1
        ip addr add xxx.xxx.34.$i/24 dev em1
        ip addr add xxx.xxx.70.$i/24 dev em1        
done

ip addr show
They all ping fine, but ifconfig output does not list them.

I'd like to fix that and need someone's help please.
 
Old 11-25-2016, 08:47 AM   #2
dab1414
Member
 
Registered: May 2011
Location: OK, USA
Distribution: Slackware 14.1_64
Posts: 76

Rep: Reputation: 52
I have never tried what you are doing, however you are using ip to add addresses. So why use ifconfig to view.
Try:
Code:
ip a
Not sure if that will work, but there is also
Code:
route
Hopefully one of those will get you what you want
 
Old 11-25-2016, 03:12 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,973

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
If they do ping then I'd have to ask what is the use of ifconfig to again prove it is working.

Might as well also ask what command did you use exactly and did you use sudo?
 
  


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
BIND (cannot ping hostnames, but can ping IPs) Jwoolington Linux - Networking 2 03-29-2013 04:34 PM
[SOLVED] how to grep IPs from ifconfig output tkmsr Linux - Newbie 8 03-06-2011 10:57 PM
slack 10.2 install ..missing things like ping,ifconfig techentral Slackware 8 01-15-2006 10:58 AM
using ping and ifconfig in C program Menestrel Programming 2 12-20-2004 08:52 AM
ifconfig/netconfig in Redhat 9 (static IPs) GomiCowboy Linux - Networking 6 09-07-2003 01:11 PM

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

All times are GMT -5. The time now is 08:25 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