LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 12-19-2011, 08:22 AM   #1
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Rep: Reputation: 0
Question I am still having a problem with assigning an IP address....


I am trying to assign an interface eth0:101 with an IP address of 10.217.y.z. Where y and z is my base address. This is for my Linux class that is due by 12:00PM. My instructor approves of this forum so that's cool. I have tried using the command "ip addr add dev eth0:101 local 10.217.y.z" and it takes it but when I do an ifdown eth0:101 I get the error message "ifdown <device name>" so in other words it is not recognizing the device name. So what can I do to resolve that? What am I doing wrong? I will give credit to anyone who can help me out. I have been at this for hours. I need any help I can get. Thanks guys.
 
Old 12-19-2011, 08:53 AM   #2
lonesoac0
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 94

Rep: Reputation: 4
Which flavor of Linux are you using? Red Hat, Debian, CentOS, etc....
 
Old 12-19-2011, 08:54 AM   #3
ongte
Member
 
Registered: Jun 2009
Location: Penang, Malaysia
Distribution: Mageia, CentOS, Ubuntu
Posts: 468

Rep: Reputation: 72
If I remember right. You gotta do it in a file, something like this:

/etc/sysconfig/network-scripts/ifcfg-eth0:101
 
Old 12-19-2011, 09:10 AM   #4
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Original Poster
Rep: Reputation: 0
I am using Red Hat Enterprise Linux. We are not supposed to create an interface configuration file for this interface.
 
Old 12-19-2011, 09:32 AM   #5
novice06
Member
 
Registered: Mar 2006
Location: Singapore
Distribution: RHEL, CentOS
Posts: 132

Rep: Reputation: 23
ifconfig eth0:101 down
Don't use ifdown for virtual interface
Note: If you don't use ongte suggestion, you will have problem when linux box is rebooted. Your command only active at runtime.
 
Old 12-19-2011, 09:37 AM   #6
lonesoac0
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 94

Rep: Reputation: 4
I have never really played with Red Hat systems but I have never seen eth0:101 on ANY Linux based systems. I have seen the command of 'ifdown eth0' or even '/sbin/ifdown eth0'. The ifdown may not be in your user's PATH or might not have the rights to execute the ifdown command.
 
Old 12-19-2011, 10:17 AM   #7
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Original Poster
Rep: Reputation: 0
I figured it out, it was right there in front of me with lecture notes must have not seen it clearly...lol. But the correct command was "ip addr add dev eth0 label eth0:101 local 10.217.y.z/8" which was the specified network mask/netmask lol. Thanks for all your help though guys i really appreciate it. So I just didn't add a label to it...lol.
 
Old 12-19-2011, 10:21 AM   #8
BMan8577
Member
 
Registered: Apr 2011
Posts: 73

Original Poster
Rep: Reputation: 0
I'd like to say though forums are really really helpful in case if I was working in an actual business environment, because this forum has really helped me to expand my knowledge on Linux/Unix Operating Systems. Because I do enjoy this class and learning about a completely different OS than WINDOWS BLAH...lol. Thanks again every1. Like all of my Networking and Systems instructors tell me use google because it can be your best friend as well as forums as an IT Support Technician/Systems Administrator/Network Administrator. YOU GUYS ROCK THANK YOU AGAIN A MILLION TIMES...lol.
 
  


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
[SOLVED] Problem on assigning static ip address.. RHEL 5 as guest OS on Virtualbox odessy Linux - Newbie 4 08-28-2009 11:51 AM
Problem on assigning static ip address.. RHEL 5 as guest OS on Virtualbox odessy Linux - Networking 1 08-28-2009 09:22 AM
Assigning IP address stryka Linux - Networking 5 12-09-2005 11:41 AM
DHCP: Problem in assigning fixed address to clients libregeek Linux - Networking 6 11-17-2005 11:59 PM
assigning ip address after install gui10 Linux - Networking 2 03-06-2002 03:36 PM


All times are GMT -5. The time now is 02:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration