assign static ip to enterprise linux through d-link router isp gives dhcp ip address

Hi,

I have a home network of 2 PC connected to a D-Link DI-604 Router.

So you get the picture, the router has a WAN port and 4 LAN ports.

PC #1 is physically attached to LAN port #1
PC #2 is physically attached to LAN port #2

My DSL modem is physically attached to the WAN port.

The router provides internet for both machines.

PC #1 is running Oracle Enterprise Linux and I need to assign a static ip address
PC#2 is running a windows os

I am able to ping over the network from windows to linux as I'm testing the linux ip address.

The problem is whenever the linux machine reboots it gets assigned a new ip address. I can see the ip address
appear in my router configuration through its web browser interface on the windows machine PC#2.

I have tried assigning a static ip through the router and there is that means to do it but it doesn't stay.
 
ora-whatAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Pull up the router configuration web page for the D-LINK router and see where it assigns DHCP (probably 192.168.x.100 through 150 or 199 or such like). Reconfigure DHCP addressing to something here (e.g. start it at 200). Restart the router. Then configure your PC's for static addresses starting at 100. You can start them anywhere really, I am just giving some ideas for relocating DHCP to have it out of the way. You can also disable it, but you might want it some day. ... Thinkpads_User
0
Kerem ERSOYPresidentCommented:
Hi,

You need to check the MAC address of your Oracle Enterprise Linux Box Ethernet interface with a command like that:

ifconfig eth0 | head -1

the numbers following the HWaddr label will be your MAC address.

- Now logon to your DI-604.
- Click DHCP button on the left menu
- Click "Enabled" under ""Static DHCP"
- Enter a Name "Oracle EL"
- Enter the last digit of the IP address you want to assign to the box.
- Enter Mac address you've got from the Linux Box
- Click Apply.

This is it.
0
ora-whatAuthor Commented:
ok i made that change,

in my router's home page I'm in home-dhcp

this is what is says in the router web page

"DHCP Server
The DI-604 can be setup as a DHCP Server to distribute IP addresses to the LAN network."

here I set the range to 192.168.0.200 - 250

"Static DHCP
Static DHCP is used to allow DHCP server to assign same IP address to specific MAC address"

here I am able to clone the MAC address of an ip address that appears in the Dynamic IP Client list (below)
and it then appears in the Static Client IP Address (below)

"Static DHCP Client List"

this list is currently empty

"Dynamic DHCP Client List
Host Name       IP Address       MAC Address       Expired Time       
      192.168.0.200      00-00-6c-f0-4d-fc      Apr/08/2002 03:01:40"

this .200 ip address appeared after I restarted the linux machine PC#1
it's the only client in the list

I restarted the router.


I restarted PC#1 (the linux machine) and when it starts it shows that

my eth0 interface has ip address 192.168.0.200 (as shown in the router Dynamic DHCP Client list)


in linux now I want to give this machine a static ip

so I vi /etc/sysconfig/network-scripts/icfg-eth0

I get

#nVidia Corporation MCP61 Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:00:6c:f0:4d:fc


should I change this file?
if so, how should I change it considering my router?




0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ora-whatAuthor Commented:
oh I just saw your comment KeremE I will try that...

0
ora-whatAuthor Commented:
Hi,

I did what you suggested,

I did:

ifconfig eth0 | head -1
I got the MAC address. It was the same address that was shown in the Dynamic DHCP Client List in the router web page for 192.168.0.200.

So under Static DHCP I gave it a name Oracle EL and entered the MAC address I got from the linux machine.
I gave it ip address 192.168.0.122 (to be out of the way of the 200 - 250 range that it now provides).
I clicked apply and I notced the the listing for 192.168.0.200 under Dynamic DHCP Clients List disappeared.

I rebooted the linux machine and it gave me ip address 192.168.0.200.

So, the static ip specified in the router doesn't seem to be working.

I think I also need to give the linux machine a static ip to match.

Could anyone help me do that?

0
Kerem ERSOYPresidentCommented:
Oracle Enterprise Linux is just some rebranded RedHat Enterprise Linux. So you need to modify here to make your change permanent:

/etc/sysconfig/networking/profiles/default/ifcfg-eth0

- Locate BOOTPROTO=  modify it  to read "none"
- Locate the IPADDR= modify it to reflect your proposed IP address.
- Modify NETMASK= if you need. If you want to assign a Default Gateway you need to modify :
- Locate GATEWAY= and modify itto reflect your DG.

Save & exit
0
ora-whatAuthor Commented:
I also noticed that the linux machine was ALSO assigned a different MAC address
0
ora-whatAuthor Commented:
ok I see,

well my /etc/sysconfig/networking/profiles/default/ifcfg-eth0 directory is empty

do i need to create the file?
0
Kerem ERSOYPresidentCommented:
Modify it to look like this:

TYPE=Ethernet
DEVICE=eth0
HWADDR=00:00:6c:f0:4d:fc
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.0.122
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=no
GATEWAY=192.168.0.1
0
Kerem ERSOYPresidentCommented:
no you can use the one you've discovered yourself.
0
Kerem ERSOYPresidentCommented:
So you can go either with this MAC or you can change the IP in the file.
0
Kerem ERSOYPresidentCommented:
Forget my note id {24836524}. Just do it this way. I've forgotten your Oracle Enterprise Linux is RedHat 4.x

#nVidia Corporation MCP61 Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
HWADDR=00:00:6c:f0:4d:fc
NETMASK=255.255.255.0
IPADDR=192.168.0.122
GATEWAY=192.168.0.1
0
Kerem ERSOYPresidentCommented:
BOOTPROTO=static

is better for your version I guess..
0
ora-whatAuthor Commented:
ok I changed the file to this in /etc/sysconfig/network-scripts/ifcfg-eth0

TYPE=Ethernet
DEVICE=eth0
HWADDR=00:00:6c:f0:4d:fc
BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.0.122
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=no
GATEWAY=192.168.0.1

then I rebooted the machine

i saw at start that I was assigned ip address 192.168.0.201
with mac address 00-00-6c-5f-22-43


#nVidia Corporation MCP61 Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
HWADDR=00:00:6c:5f:22:43


so the changes I made do not stay

in my router there are now 2 entries under

Dynamic DHCP Client List
Host Name       IP Address       MAC Address       Expired Time       
      192.168.0.201      00-00-6c-5f-22-43      Apr/08/2002 03:41:36
      192.168.0.200      00-00-6c-3a-66-11      Apr/08/2002 03:16:50

and the same static entry is still there

Static DHCP Client List
        Host Name       IP Address       MAC Address       
      Oracle VM Server      192.168.0.122      00-00-6c-f0-4d-fc


they keep changing..
0
Kerem ERSOYPresidentCommented:
I guess this is not an issue with Oracle Enterprise but it is a problem with VMWare. Please check this here:

http://www.vmware.com/support/ws55/doc/ws_net_advanced_mac_address.html

0
JohnBusiness Consultant (Owner)Commented:
Is the Oracle machine a Viirtual Machine? If so, put it in Bridge mode (you have a router) and then VMware will not interfere with the Oracle VM with respect to DHCP. ... Thinkpads_User
0
ora-whatAuthor Commented:
it's not vware

it's a product called Oracle VM Server

you can download it for free

it's really a minimal version of Oracle Enterprise Server

0
ora-whatAuthor Commented:
it's not VMware sorry
0
Kerem ERSOYPresidentCommented:
Yeah :)

But oracle dose not really make its VM server but I was thinking that it was rebranded VMWare. However I now see that  it is actually Xen server. I was thinking that this reminds me XEn because if you don't assign a MAC to Xen it does excatly the same thing.

You need to locate the config file for your VM. It should normally rest at /etc/xen:

Find the line in it:

vif = [ "bridge=xenbr0" ]

and chenge it to:

vif = [ "mac=00-00-6c-5f-22-43,bridge=xenbr0" ]



0
Kerem ERSOYPresidentCommented:
The document server says the file is named vm.cfg
0
ora-whatAuthor Commented:
yes the release is this:

2.6.18-8.1.15.3.1.el5xen


I will let know what happens very soon.....
0
Kerem ERSOYPresidentCommented:
Ok take your time.

This is a known problem with XEN. But I'd never met one because I always assign a MAC address to my virtual interfaces during installation cus I'd always though that this would be a potential pitfall.

Oracle has its Enterprise Linux but it does not develop its own Linux distro. They re simply re-branding Red Hat Enterprise. It seems that they are actually repacking Xen enabled kernel over Red-Hat enterprise as a different product.

Why don't you go for CentOS it is directly built from RHEL sources and rebranded. It is free. You can find lots of documentation on implementing. XEN clients.

The community does not like Re-branded and priced software as it is often means stipulations on source code availability and modification polices. I'll suggest you to go with the Open source and well documented Xen host such as CentOS. Or if you want to be on the safe side you can directly go for Red Hat Enterprise instead.

Cheers,
K.
0
ora-whatAuthor Commented:
I actually got this working by installing Oracle VM Server into VMWare workstation 6.5 using this article,

http://www.planetmy.com/blog/how-to-install-oracle-vm-in-vmware-workstation/

the ip address stayed the same for oracle vm server

i was also able to install the Oracle VM manager on oracle enterprise linux in vmware workstation 6.5 and got it working with the Siebel 8.1 template
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.