Solved

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

Posted on 2009-07-12
23
840 Views
Last Modified: 2012-05-07
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.
 
0
Comment
Question by:ora-what
  • 11
  • 10
  • 2
23 Comments
 
LVL 90

Expert Comment

by:John Hurst
ID: 24836379
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
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 500 total points
ID: 24836453
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
 

Author Comment

by:ora-what
ID: 24836459
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
 

Author Comment

by:ora-what
ID: 24836462
oh I just saw your comment KeremE I will try that...

0
 

Author Comment

by:ora-what
ID: 24836500
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836502
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
 

Author Comment

by:ora-what
ID: 24836503
I also noticed that the linux machine was ALSO assigned a different MAC address
0
 

Author Comment

by:ora-what
ID: 24836512
ok I see,

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

do i need to create the file?
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836524
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836527
no you can use the one you've discovered yourself.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836531
So you can go either with this MAC or you can change the IP in the file.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836533
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836537
BOOTPROTO=static

is better for your version I guess..
0
 

Author Comment

by:ora-what
ID: 24836568
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836594
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
 
LVL 90

Expert Comment

by:John Hurst
ID: 24836611
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
 

Author Comment

by:ora-what
ID: 24836618
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
 

Author Comment

by:ora-what
ID: 24836619
it's not VMware sorry
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 500 total points
ID: 24836633
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
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836642
The document server says the file is named vm.cfg
0
 

Author Comment

by:ora-what
ID: 24836837
yes the release is this:

2.6.18-8.1.15.3.1.el5xen


I will let know what happens very soon.....
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24836855
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
 

Accepted Solution

by:
ora-what earned 0 total points
ID: 25009378
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

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
Let’s list some of the technologies that enable smooth teleworking. 
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now