DHCP req between ONIE and ONL

253 views
Skip to first unread message

Sridhar Pitchai

unread,
Aug 27, 2016, 11:35:21 AM8/27/16
to opennetworklinux
Hi,
one of the customer is facing issue with DHCP IP being different between ONIE and ONL. the only difference we noticed is when on ONIE mode DHCP request has "dhcp-client-identifier" where as  ONL DHCP request does not. 
I can manually add, to address after onl comes up.
"
root@localhost:/etc/dhcp# cat /etc/dhcp/dhclient.conf | grep client-id
send dhcp-client-identifier "\001\3147\253\340\236\317";

How to address it in ONL by default to set the dhcp-client-id just like ONIE ?

any suggestion. 


Thanks,
Sridhar

Jeffrey Townsend

unread,
Aug 27, 2016, 1:18:23 PM8/27/16
to Sridhar Pitchai, opennetworklinux
Sridhar, 

On your system, from ONIE, can you run the following a give me the output?

ONIE:/ # sh -x /etc/init.d/networking.sh

Jeff

This message and its attachments are intended only for the addressee and may contain legally privileged and/or confidential information. If you are not the intended recipient, you are hereby notified that you must not use, disseminate, or copy this material in any form, or take any action based upon it. If you have received this message by error, please immediately delete it and its attachments and notify the sender at SnapRoute, Inc. by electronic mail message reply. Thank you.

--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sridhar Pitchai

unread,
Aug 27, 2016, 8:38:36 PM8/27/16
to Jeffrey Townsend, opennetworklinux
Hi Jeff,
pasting the output.
root@localhost:~#
root@localhost:~# onie-shell
/ # sh -x /etc/init.d/networking.sh
+ PATH=/usr/bin:/usr/sbin:/bin:/sbin
+ . /lib/onie/functions
+ [ -r /etc/machine.conf ]
+ . /etc/machine.conf
+ onie_version=2015.11.00.01
+ onie_vendor_id=259
+ onie_platform=x86_64-accton_as5812_54t-r0
+ onie_machine=accton_as5812_54t
+ onie_machine_rev=0
+ onie_arch=x86_64
+ onie_config_version=1
+ onie_build_date=2015-12-21T14:02+0800
+ onie_partition_type=gpt
+ onie_kernel_version=3.2.69
+ onie_firmware=bios
+ export onie_installer=/var/tmp/installer
+ ONIE_RUN_DIR=/var/run/onie
+ tee_log_file=/dev/console
+ [  = update -o  = embed ]
+ filename_prefix=onie-installer
+ onie_operation=os-install
+ onie_default_filename=onie-installer-x86_64-accton_as5812_54t-r0
+ onie_default_filenames=onie-installer-x86_64-accton_as5812_54t-r0
onie-installer-x86_64-accton_as5812_54t
onie-installer-accton_as5812_54t
onie-installer-x86_64
onie-installer

+ onie_server_name=onie-server
+ syslog_onie=local0
+ syslog_tag=onie
+ onie_iana_enterprise=42623
+ onie_updater_cookie=ONIE-UPDATER-COOKIE
+ onie_image_type_update=update
+ onie_image_type_nos=nos
+ import_cmdline
+ cat
+ ONIE_REQUIRED_ARGS=serial_num
eth_addr
sec_key
+ cat
+ ONIE_OPTIONAL_ARGS=verbose
boot_reason
testing
ip
install_url
bootfile
dhcp
+ cat /proc/cmdline
+ parm=BOOT_IMAGE
+ val=/kernel-3.2-deb7-x86_64-all
+ parm=nopat
+ val=nopat
+ parm=console
+ val=ttyS1,115200n8
+ parm=onl_platform
+ val=x86-64-accton-as5812-54t-r0
+ true install
+ eval export onie_serial_num
+ export onie_serial_num
+ eval export onie_eth_addr
+ export onie_eth_addr
+ eval export onie_sec_key
+ export onie_sec_key
+ eval export onie_verbose
+ export onie_verbose
+ eval export onie_boot_reason
+ export onie_boot_reason
+ eval export onie_testing
+ export onie_testing
+ eval export onie_ip
+ export onie_ip
+ eval export onie_install_url
+ export onie_install_url
+ eval export onie_bootfile
+ export onie_bootfile
+ eval export onie_dhcp
+ export onie_dhcp
+ [  = start ]
+ config_ethmgmt
+ net_intf
+ intf=
+ [ -n  ]
+ [ -n  ]
+ [ -z  ]
+ ifconfig -a
+ grep Ethernet
+ sed -e /dummy/d
+ awk {print $1}
+ intf_list=ma1
+ echo ma1
+ intf_list=ma1
+ intf_counter=0
+ return_value=0
+ cmd_run ifconfig ma1 up
+ [  = y ]
+ eval ifconfig ma1 up
+ ifconfig ma1 up
+ params=ma1
+ eval result_ma1=0
+ result_ma1=0
+ check_link_up ma1
+ local intf=ma1
+ local operstate=/sys/class/net/ma1/operstate
+ _log_info_msg Info: ma1:  Checking link...
+ printf Info: ma1:  Checking link...
+ tee /dev/console
+ logger -t onie -p local0.info
+ local i=0
+ [ -r /sys/class/net/ma1/operstate ]
+ [ 0 -lt 100 ]
+ cat /sys/class/net/ma1/operstate
+ intf_operstate=up
+ [ up = up -o up = unknown ]
+ _log_info_msg up.\n
+ printf up.\n
+ + loggertee -t /dev/console onie
+ return 0
+ config_ethmgmt_static ma1
+ local intf=ma1
+ shift
+ [ -n  ]
+ return 1
+ config_ethmgmt_dhcp6 ma1
+ intf=ma1
+ shift
+ return 1
+ config_ethmgmt_dhcp4 ma1
+ intf=ma1
+ shift
+ udhcpc_args
+ local udhcp_args=-q -S -V onie_vendor:x86_64-accton_as5812_54t-r0
+ str2hex onie_dhcp_user_class
+ echo -n onie_dhcp_user_class
+ hexdump -ve 1/1 "%.2x"
+ local udhcp_user_class=-x 77:6f6e69655f646863705f757365725f636c617373
+ make_str_opt 3 accton_as5812_54t
+ local code=3
+ local str=accton_as5812_54t
+ str2hex accton_as5812_54t
+ echo -n accton_as5812_54t
+ hexdump -ve 1/1 "%.2x"
+ printf %02X%02X%s 3 17 616363746f6e5f6173353831325f353474
+ local udhcp_vivso_machine=0311616363746f6e5f6173353831325f353474
+ make_str_opt 4 x86_64
+ local code=4
+ local str=x86_64
+ str2hex x86_64
+ echo -n x86_64
+ hexdump -ve 1/1 "%.2x"
+ printf %02X%02X%s 4 6 7838365f3634
+ local udhcp_vivso_arch=04067838365f3634
+ make_str_opt 5 0
+ local code=5
+ local str=0
+ str2hex 0
+ echo -n 0
+ hexdump -ve 1/1 "%.2x"
+ printf %02X%02X%s 5 1 30
+ local udhcp_vivso_machine_rev=050130
+ local payload=0311616363746f6e5f6173353831325f35347404067838365f3634050130
+ local len=30
+ printf %08X%02X%s 42623 30 0311616363746f6e5f6173353831325f35347404067838365f3634050130
+ local udhcp_vivso=-x 125:0000A67F1E0311616363746f6e5f6173353831325f35347404067838365f3634050130
+ echo -q -S -V onie_vendor:x86_64-accton_as5812_54t-r0 -x 77:6f6e69655f646863705f757365725f636c617373 -x 125:0000A67F1E0311616363746f6e5f6173353831325f35347404067838365f3634050130
+ udhcp_args=-q -S -V onie_vendor:x86_64-accton_as5812_54t-r0 -x 77:6f6e69655f646863705f757365725f636c617373 -x 125:0000A67F1E0311616363746f6e5f6173353831325f35347404067838365f3634050130 -n -o
+ [  = discover ]
+ udhcp_args=-q -S -V onie_vendor:x86_64-accton_as5812_54t-r0 -x 77:6f6e69655f646863705f757365725f636c617373 -x 125:0000A67F1E0311616363746f6e5f6173353831325f35347404067838365f3634050130 -n -o -t 15 -T 3
+ udhcp_request_opts=
+ udhcp_request_opts= -O subnet
+ udhcp_request_opts= -O subnet -O broadcast
+ udhcp_request_opts= -O subnet -O broadcast -O router
+ udhcp_request_opts= -O subnet -O broadcast -O router -O domain
+ udhcp_request_opts= -O subnet -O broadcast -O router -O domain -O hostname
+ udhcp_request_opts= -O subnet -O broadcast -O router -O domain -O hostname -O ntpsrv
+ udhcp_request_opts= -O subnet -O broadcast -O router -O domain -O hostname -O ntpsrv -O dns
+ udhcp_request_opts= -O subnet -O broadcast -O router -O domain -O hostname -O ntpsrv -O dns -O logsrv
+ udhcp_request_opts= -O subnet -O broadcast -O router -O domain -O hostname -O ntpsrv -O dns -O logsrv -O search
+ log_info_msg Trying DHCPv4 on interface: ma1
+ _log_info_msg Info: Trying DHCPv4 on interface: ma1\n
+ printf Info: Trying DHCPv4 on interface: ma1\n
+ + teelogger /dev/console -t
 onie -p local0.info
+ udhcpc -q -S -V onie_vendor:x86_64-accton_as5812_54t-r0 -x 77:6f6e69655f646863705f757365725f636c617373 -x 125:0000A67F1E0311616363746f6e5f6173353831325f35347404067838365f3634050130 -n -o -t 15 -T 3 -O subnet -O broadcast -O router -O domain -O hostname -O ntpsrv -O dns -O logsrv -O search -i ma1 -s /lib/onie/udhcp4_net
touch: /var/run/onie/dhcp.logsrv: No such file or directory
+ tmp=udhcpc (v1.20.2) started
Sending discover...
Sending select for 10.1.10.231...
Lease of 10.1.10.231 obtained, lease time 86400
+ [ 0 = 0 ]
+ ifconfig ma1
+ grep inet
+ sed -e s/:/ /g
+ awk { print $3 " / " $7 }
+ local ipaddr=10.1.10.231 / 255.255.255.0
+ log_console_msg Using DHCPv4 addr: ma1: 10.1.10.231 / 255.255.255.0
+ _log_console_msg ONIE: Using DHCPv4 addr: ma1: 10.1.10.231 / 255.255.255.0\n
+ printf ONIE: Using DHCPv4 addr: ma1: 10.1.10.231 / 255.255.255.0\n
+ tee /dev/console
+ logger -t onie -p local0.info
+ return 0
+ intf_counter=1
+ eval curr_intf_result=${result_ma1}
+ curr_intf_result=0
+ [ x0 != x0 ]
+ return 0
/ #


Thanks,
Sridhar

Jeffrey Townsend

unread,
Aug 28, 2016, 12:41:49 PM8/28/16
to Sridhar Pitchai, opennetworklinux
Sridhar, 

Are you using the deb7 or deb8 version of ONL? 

J

Hi Jeff,

On Aug 27, 2016, at 10:18 AM, Jeffrey Townsend <jeffrey.townsend@bigswitch.com> wrote:

Sridhar, 

On your system, from ONIE, can you run the following a give me the output?

ONIE:/ # sh -x /etc/init.d/networking.sh

Jeff

On Sat, Aug 27, 2016 at 8:35 AM, Sridhar Pitchai <spit...@snaproute.com> wrote:
Hi,
one of the customer is facing issue with DHCP IP being different between ONIE and ONL. the only difference we noticed is when on ONIE mode DHCP request has "dhcp-client-identifier" where as  ONL DHCP request does not. 
I can manually add, to address after onl comes up.
"
root@localhost:/etc/dhcp# cat /etc/dhcp/dhclient.conf | grep client-id
send dhcp-client-identifier "\001\3147\253\340\236\317";

How to address it in ONL by default to set the dhcp-client-id just like ONIE ?

any suggestion. 


Thanks,
Sridhar



This message and its attachments are intended only for the addressee and may contain legally privileged and/or confidential information. If you are not the intended recipient, you are hereby notified that you must not use, disseminate, or copy this material in any form, or take any action based upon it. If you have received this message by error, please immediately delete it and its attachments and notify the sender at SnapRoute, Inc. by electronic mail message reply. Thank you.

--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Sridhar Pitchai

unread,
Aug 28, 2016, 2:33:11 PM8/28/16
to Jeffrey Townsend, opennetworklinux
Hi Jeff,
I am using Debian 8

Sridhar 
Hi Jeff,

On Aug 27, 2016, at 10:18 AM, Jeffrey Townsend <jeffrey....@bigswitch.com> wrote:

Sridhar, 

On your system, from ONIE, can you run the following a give me the output?

ONIE:/ # sh -x /etc/init.d/networking.sh

Jeff

On Sat, Aug 27, 2016 at 8:35 AM, Sridhar Pitchai <spit...@snaproute.com> wrote:
Hi,
one of the customer is facing issue with DHCP IP being different between ONIE and ONL. the only difference we noticed is when on ONIE mode DHCP request has "dhcp-client-identifier" where as  ONL DHCP request does not. 
I can manually add, to address after onl comes up.
"
root@localhost:/etc/dhcp# cat /etc/dhcp/dhclient.conf | grep client-id
send dhcp-client-identifier "\001\3147\253\340\236\317";

How to address it in ONL by default to set the dhcp-client-id just like ONIE ?

any suggestion. 


Thanks,
Sridhar



This message and its attachments are intended only for the addressee and may contain legally privileged and/or confidential information. If you are not the intended recipient, you are hereby notified that you must not use, disseminate, or copy this material in any form, or take any action based upon it. If you have received this message by error, please immediately delete it and its attachments and notify the sender at SnapRoute, Inc. by electronic mail message reply. Thank you.

--
You received this message because you are subscribed to the Google Groups "opennetworklinux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opennetworklinux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




This message and its attachments are intended only for the addressee and may contain legally privileged and/or confidential information. If you are not the intended recipient, you are hereby notified that you must not use, disseminate, or copy this material in any form, or take any action based upon it. If you have received this message by error, please immediately delete it and its attachments and notify the sender at SnapRoute, Inc. by electronic mail message reply. Thank you.

Jeffrey Townsend

unread,
Aug 28, 2016, 2:58:37 PM8/28/16
to Sridhar Pitchai, opennetworklinux
Sridhar, 

In Deb8 you can use the -i option to dhclient to send the client id. I assume you've tried this and the difference in format between udhcpc's option 61 and dhclient's option 61 is still causing an issue?

J

On Sun, Aug 28, 2016 at 11:33 AM, Sridhar Pitchai <spit...@snaproute.com> wrote:
Hi Jeff,
I am using Debian 8

Sridhar 

Sridhar Pitchai

unread,
Aug 29, 2016, 1:33:47 PM8/29/16
to Jeffrey Townsend, opennetworklinux
Hi Jeff,
What we did is updated dhclient.conf manually. 
root@localhost:/etc/dhcp# cat /etc/dhcp/dhclient.conf | grep client-id
send dhcp-client-identifier "\001\3147\253\340\236\317”;

what we are looking for is to set the DHCP on ONL such a way that client-ID is sent out automatically just like ONIE udhcp. 

I was thinking if we can update the etc file with a higher priority init script which update this option before networking is invoked, not sure if this the best option. can you suggest how to sort this out.

Thanks,
Sridhar 

Jeffrey Townsend

unread,
Aug 29, 2016, 1:35:25 PM8/29/16
to Sridhar Pitchai, opennetworklinux
Sridhar, 

I understand what you did. What I would like to know is does dhclient -i also solve the problem?

J

On Mon, Aug 29, 2016 at 10:33 AM, Sridhar Pitchai <spit...@snaproute.com> wrote:
Hi Jeff,
What we did is updated dhclient.conf manually. 
root@localhost:/etc/dhcp# cat /etc/dhcp/dhclient.conf | grep client-id
send dhcp-client-identifier "\001\3147\253\340\236\317”;

what we are looking for is to set the DHCP on ONL such a way that client-ID is sent out automatically just like ONIE udhcp. 

I was thinking if we can update the etc file with a higher priority init script which update this option before networking is invoked, not sure if this the best option. can you suggest how to sort this out.

Thanks,
Sridhar 

Sridhar Pitchai

unread,
Aug 29, 2016, 1:40:04 PM8/29/16
to Jeffrey Townsend, opennetworklinux
Sure Jeff. 
Let me quickly test it out and get back.

Thanks,
Sridhar

Sridhar Pitchai

unread,
Aug 29, 2016, 2:33:12 PM8/29/16
to Jeffrey Townsend, opennetworklinux
Hi Jeff,
dhclinet -i client ID format is different from ONIE as you pointed out. that did;t helped.
ONIE:

lease 10.1.10.39 {
 starts 1 2016/08/29 17:42:59;
 ends 2 2016/08/30 17:42:59;
 cltt 1 2016/08/29 17:42:59;
 binding state active;
 next binding state free;
 rewind binding state free;
 hardware ethernet 00:e0:ec:39:13:22;
 uid "\001\000\340\3549\023\"";
}

dhclient -i:

lease 10.1.10.17 {
 starts 1 2016/08/29 18:23:30;
 ends 2 2016/08/30 18:23:30;
 cltt 1 2016/08/29 18:23:30;
 binding state active;
 next binding state free;
 rewind binding state free;
 hardware ethernet 00:e0:ec:39:13:22;
 uid "\377\3549\023\"\000\001\000\001\002\275\017\035\000\340\3549\023\"";
 client-hostname "localhost";
}
"

Thanks,
Sridhar

Jeffrey Townsend

unread,
Aug 31, 2016, 1:35:03 PM8/31/16
to Sridhar Pitchai, opennetworklinux
Sridhar, 

Please see the following commit. The system now populates dhclient.conf with the appropriate client-id for ma1. 


J

On Mon, Aug 29, 2016 at 11:33 AM, Sridhar Pitchai <spit...@snaproute.com> wrote:
Hi Jeff,

Sridhar Pitchai

unread,
Aug 31, 2016, 1:44:20 PM8/31/16
to Jeffrey Townsend, opennetworklinux
thanks Jeff.
Reply all
Reply to author
Forward
0 new messages