[UPDATED:] Re: confusion on /sbin/ifconfig on F16

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[updated, keeping original post and adding new info at bottom]

On 5/22/2012 8:12 PM, Paul Allen Newell wrote:
Hello:

As I continue dealing with iptables, another issue has come up that I can't tell is a mis-understanding on my part or a potential problem

I have three F16 machines, one x86_64 and two i383/686. If I run /sbin/ifconfig on them, I get (short summary of):

x86_64: eth0
i686: em1

Looking in /etc/sysconfig/network-scripts, I can see only ifcfg-em1 and no ifcfg-eth0 on all the machines (x86_64 and i686).

The closest bugzilla I can see if 784314 but it looks like it hints that ifconfig is old-school and the right way to do things (and its F17 not F16).

Does anyone know what I am either doing wrong or if this looks like a problem/bug. Plus, if there is a better way, I'd love to know.

What I want to do is have is a bash way to get the static ip address of the machine which I can see in eth0/em1. I've been using something I found online which assumes everything is eth0 (as in I think it was for older Fedora):
+++
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
+++

Its too clever for me to have come up with on my own (smile).

I tried expanding the grep to be 'inet addr:192.168.2' but that failed on the laptop which has an entry for wireless which is dhcp (I cannot assume wireless will be 192.168.2.*).

Any suggestions appreciated,
Thanks,
Paul

Okay, so I managed to figure out that 'ip' is the new command. I'd looked at it earlier to try to find a way around this, but couldn't figure it out. Just spotted the 'obsolete, use ip' in man page of ifconfig. As usual, there is always something discovered right after I make the post.

Should I assume that even if ifconfig is giving a problem, its academic and I should just focus on ip. And, if so, how the heck does one get the ip addr. If I use "ip addr show", I still get eth0 on the x86_64 and em1 on the i686?

Thanks,
Paul

--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux