2018年3月1日

Linux 下获取本机IP

摘要: http://blog.csdn.net/K346K346/article/details/48231933 /*//设置为本机IP,如果获取地址失败则使用hostname,这种获取方式依赖/etc/hosts,获取不准。 // 获取本机地址,只取一个 hostent* pHost = gethos 阅读全文

posted @ 2018-03-01 09:57 偏爱省略号 阅读(1981) 评论(0) 推荐(0) 编辑

2017年6月2日

long 与int 比较问题

摘要: long 与int 比较,在32位机器,sizeof都是 占用4个字节; 在window 64位也是占用4个字节 但是在Linux 64位,long占用 8个字节, int占用4个字节,这样比较就会有问题。 当int 强转 位long时,发生 int高位1(符号位1)转为long的高位1(补全) 出 阅读全文

posted @ 2017-06-02 09:11 偏爱省略号 阅读(8057) 评论(0) 推荐(0) 编辑

2017年6月1日

Linux 下获取通讯IP

摘要: shell脚本获取linux下的活动网络信息,包括ip、broadcast、netmask、gateway以及dns的信息。 阅读全文

posted @ 2017-06-01 08:57 偏爱省略号 阅读(697) 评论(0) 推荐(0) 编辑

2017年5月18日

linux 中文输出

摘要: #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 9 int main() 10 { 11 std::basic_ifstream > fs("./test.txt"); 12 if ( fs.fail() ... 阅读全文

posted @ 2017-05-18 15:52 偏爱省略号 阅读(194) 评论(0) 推荐(0) 编辑

2015年10月16日

Ubuntu配置IP

摘要: Ubuntu网络配置的常用系统,于是我学习研究了Ubuntu网络配置,在这里对大家详细介绍下Ubuntu网络配置应用,希望对大家有用Ubuntu网络配置包含了非常好的翻译和容易使用的架构./etc/network/interfaces打开后里面可设置DHCP或手动设置静态ip。前面auto eth0... 阅读全文

posted @ 2015-10-16 13:21 偏爱省略号 阅读(279) 评论(0) 推荐(0) 编辑

2015年10月15日

Install Maven

摘要: Now, install a JDK.# sudo apt-get install openjdk-7-jdkWe need Maven to build ODL. Install the most recent version of Maven# sudo mkdir -p /usr/local/... 阅读全文

posted @ 2015-10-15 16:22 偏爱省略号 阅读(499) 评论(0) 推荐(0) 编辑

2015年10月8日

ubuntu14.04上安装Java

摘要: apt-get安装sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo apt-get install oracle-java7-installersudo apt-get install oracle-java7-s... 阅读全文

posted @ 2015-10-08 11:09 偏爱省略号 阅读(280) 评论(0) 推荐(0) 编辑

2015年9月17日

Open VSwitch

摘要: 本文主要介绍Open VSwitch - 虚拟交换机的概述内容,阅读本文可以对OVS(Open VSwitch)有一个大致的了解。那么本文主要回答了这样几个问题:1. 虚拟交换机是什么,干什么?2. 虚拟网络和OVS3. OVS的组件有哪些?4. 使用OVS创建一个网络拓扑5. 示例一、 Open ... 阅读全文

posted @ 2015-09-17 16:46 偏爱省略号 阅读(355) 评论(0) 推荐(0) 编辑

2015年9月16日

What is the "internal" interface and port for on Openvswitch?

摘要: 转:https://ask.openstack.org/en/question/4276/what-is-the-internal-interface-and-port-for-on-openvswitch/The internal interface and port in each bridge... 阅读全文

posted @ 2015-09-16 19:27 偏爱省略号 阅读(511) 评论(0) 推荐(0) 编辑

测试FlowTable

摘要: 1.确定openvswitch模块加载#lsmod |grep oepnvswitch#/sbin/modprobe openvswitch 2.启动配置:1)默认配置rm -f /usr/local/etc/openvswitch/conf.dbovsdb-tool create /usr/loc... 阅读全文

posted @ 2015-09-16 16:02 偏爱省略号 阅读(762) 评论(0) 推荐(0) 编辑

导航