最简单的小公司子网划分,望高手指教

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/liyun211/article/details/48847985

看了不少子网划分的例子,多数是写 给定一个网络段,例如 172.17.0.0,利用这个网段再次划分子网,可是,在小微型企业中,如果申请公网ip,估计也就

申请1-2个,毕竟占用公网ip要花钱的,现在,假设公司只有一个公网ip (222.122.122.122),如何利用这一个ip让公司各个部门共享呢?我这个菜鸟想了一个最简单办法,请高手指教。


假设公司有5个部门,所以要划分5个子网,我为5个部门使用5个路由器,5个路由器lan口分别设为192.168.10.0, 192.168.20.0, 192.168.20.0, 192.168.30.0, 192.168.40.0,192.168.50.0 这五个网段,子网掩码都是255.255.255.0;这5个路由器的wan口设为静态ip,分别设置为 172.17.10.10,172.17.10.20,172.17.10.30,172.17.10.40,172.17.10.50;

5个wan口都接到一个交换机上,这个交换机最后级联到公司的总路由器的lan口上,总路由器的lan设置网段为:172.17.10.0;子网掩码为255.255.255.0,wan口设为 222.122.122.122;

请问各位大虾:上述网络设置能成功让各个公司部门通过222.122.122.122这个ip上互联网吧??是不是很简单?


展开阅读全文

望各位高手指教

09-08

你好。rn 最近在学Linux, 也在虚拟机器上装了Linux 。版本是.Red hat Linux 5rn rn 装好后,感觉挺好的,没什么问题。rnrn 但我昨天想下个nagios装载Linux上,打开网页突然发现乱码/中文字符显示为两个数字组成的图片。rnrn 我感觉,乱码而已,在网站上找答案,方法很多,但我试了几种,按道理是可以了,但结果恰恰相反。本来只是网页上的中文字符乱码,现在连桌面上的文件夹也乱码了。rnrn 这就是我的乱码情况。[img=http://b50.photo.store.qq.com/http_imgload.cgi?/rurl4_b=dde9a1c38d6308d327172cfa12158e6d3105b28b3226cc6bf8b59addebc578c77f890d230a2fb10f87bb1a58d8360b73abd50a5f29d8f4240769827d2d365dc3ded6b58a3d38fbab250f5f37035eecad81641552&a=50&b=50][/img]rn rn 我想到的疑虑 : 一,是这个linux 5 版本系统不包含中文语言包,所以设置没效果。因为。按道理我改了etc/config/i18n 文件就应该显示正常。rn 二,是有些设置没到位? 因为:我现在只改了 etc/config/i18n和 etc/profilernrnrn 小弟还未过试用期,已经上班22天了,老大叫我学习一个月,可是这一个月什么都学一点,什么都没学精,没有一样拿不出手的,我怕过不了试用期。大家火速帮我,因为我不只这一个问题,这个问题之后连着更多的问题,比如在linux上装nagios,nagios监测数据库, 这些东西之前我完全都没接触过。但我还是想把任务做完,做好。 论坛

菜鸟求助!望高手指教

12-31

初学汇编有个问题一直搞不懂!望各位指点,感激不尽!rn程序说明:用二进制形式显示所按键的ASCII码.rn首先用dos功能调用接受一个字符(int 21h的1号功能)然后通过移位的方法从高到底依次把其ASCII码的各二进制位析出在屏幕上显示出来!rn代码:rnzfc segmentrnstr db "qing shu ru zhi fu!$" (提示信息)rnzfc endsrndaima segmentrnassume cs:daima,ds:zfcrnhh proc near ( hh实现回车换行)rn mov ah,2hrn mov dl,0dhrn int 21hrn mov ah,2hrn mov dl,0ahrn int 21hrn retrnhh endprnkaishi:mov ax,zfcrn mov ds,axrn mov ah,9hrn mov dx,offset strrn int 21h (显示提示信息)rn call hh (回车换行)rn mov ah,0ch rn mov al,1 (清楚输入缓冲区并调用一号功能接受输入)rn int 21hrn mov dh,al (这里有个问题下面的2号功能调用会改变al中的值搞不懂,只好转移到dh)rn mov ah,2hrn mov dl,':'rn int 21hrn mov cx,8 (这个循环依次显示asscii码的二进制形式)rnnext: shl dh,1rn jc s1rn mov ah,2rn mov dl,'0'rn int 21hrn loop nextrns1: mov ah,2rn mov dl,'1'rn int 21hrn loop nextrn mov ax,4c00hrn int 21hrndaima endsrnend kaishirn问题所在:输入字母和数字的话程序是正常的!输入其他字符就会进入死循环!具体情况是用debug调试发现当CX中的值为0时loop依然会转移到next标号处!还有就是上面那个问题!用一号功能接受输入后在调用2号功能,会改变al中的值!(书上说2号功能没有输出参数)rn下面这段代码是书上的例题!以上问题依然出现再书上的这段代码中!rncseg segmentrn assume cs:cseg,ds:csegrnstart: mov ah,1rn int 21hrn call near ptr newlnern mov bl,alrn mov cx,8rnnext: shl bl,1rn mov dl,30hrn adc dl,0rn mov ah,2rn int 21hrn loop nextrn mov dl,'b'rn mov ah,2rn int 21hrn mov ah,4chrn int 21rnnewlne procrn push axrn push dxrn mov dl,0dhrn mov ah,2rn int 21hrn mov dl,0ahrn mov ah,2rn int 21hrn pop dxrn pop axrn retrnnewlne endprncseg endsrnend start 论坛

初学者问题,望高手指教

05-03

初学者问题,望高手指教!rn#include "stdafx.h"rn#include "iostream.h"rnrnclass student rnrn friend ostream & operator<<(ostream &,const student & );rn friend istream & operator>>(istream & ,student & );rnpublic:rn student(student &);rn student(int,string,string);rn int getAge();rn string getName();rn string getClassName();rn void setAge(int);rn void setName(string);rn void setClassName(string);rn virtual ~student();rnprivate:rn int age;rn string name;rn string className;rn;rnrnstudent::student(student &stu)rnrn this->age = stu.age;rn this->className = stu.className;rn this->name = stu.name;rnrnrnstudent::student(int age,string name,string className)rnrn this->age = age;rn this->name = name;rn this->className = className;rnrnrnint student::getAge()rn return this->age;rnrnrnstring student::getName()rn return this->name;rnrnrnstring student::getClassName()rn return this->className;rnrnrnvoid student::setAge(int age)rn this->age = age;rnrnrnvoid student::setName(string name)rn this->name = name;rnrnrnvoid student::setClassName(string className)rn this->className = className;rnrnstudent::~student()rnrnrnrnint main(int argc, char* argv[])rnrn return 0;rnrnrnostream & operator<<(ostream &out ,const student &stu)rn out<<"this student info is :\n"rn <<"name :"<>(istream &in ,student &stu)rn in>>"Please input this student info :\n"rn cout<<"name is :"<<"\n";rn in>>stu.name;rn cout<<"age is:"<<"\n"rn in>>stu.age;rn cout<<"className is:"<<"\n";rn in>>stu.className;rnrn这是我的代码,为什么会报错误?rn错误为:rnstduentT.cpprnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(14) : error C2629: unexpected 'class student ('rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(14) : error C2238: unexpected token(s) preceding ';'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(16) : error C2146: syntax error : missing ';' before identifier 'getName'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(16) : error C2501: 'string' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(17) : error C2146: syntax error : missing ';' before identifier 'getClassName'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(17) : error C2501: 'string' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(19) : error C2061: syntax error : identifier 'string'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(20) : error C2061: syntax error : identifier 'string'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(24) : error C2146: syntax error : missing ';' before identifier 'name'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(24) : error C2501: 'string' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(24) : error C2501: 'name' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(25) : error C2146: syntax error : missing ';' before identifier 'className'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(25) : error C2501: 'string' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(25) : error C2501: 'className' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(31) : error C2039: 'className' : is not a member of 'student'rn H:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(9) : see declaration of 'student'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(31) : error C2039: 'className' : is not a member of 'student'rn H:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(9) : see declaration of 'student'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(32) : error C2039: 'name' : is not a member of 'student'rn H:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(9) : see declaration of 'student'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(32) : error C2039: 'name' : is not a member of 'student'rn H:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(9) : see declaration of 'student'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(35) : error C2061: syntax error : identifier 'string'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(36) : error C2511: 'student::student' : overloaded member function 'void (int)' not found in 'student'rn H:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(9) : see declaration of 'student'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(46) : error C2143: syntax error : missing ';' before 'tag::id'rnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(46) : error C2501: 'string' : missing storage-class or type specifiersrnH:\Program Files\Microsoft Visual Studio\MyProjects\stduentT\stduentT.cpp(46) : fatal error C1004: unexpected end of file foundrn执行 cl.exe 时出错.rn刚开始学习,就出这样的错误很郁闷,希望大家能帮帮小弟,谢谢! 论坛

C#菜鸟望高手指教

05-13

create table DeptInforn(rn DeptId int identity(1,1) primary key,rn Deptname varchar(50)rn)rnrninsert into DeptInfo values('人事部')rninsert into DeptInfo values('市场部')rninsert into DeptInfo values('人力资源部')rnrnrnrncreate table Userinforn(rn UserID int identity(1,1) primary key,rn UserName varchar(50) not null,rn Sex char(2),rn Age int,rn Hobby varchar(50),rn DeptID int references DeptInfo(DeptId)rn rn)rnrninsert into Userinfo values('张三','男','18','篮球',1)rninsert into Userinfo values('李四','女','19','篮球',2)rninsert into Userinfo values('王二','男','20','篮球',3)rninsert into Userinfo values('麻子','男','23','篮球',2)rnrnrnusing System;rnusing System.Collections.Generic;rnusing System.ComponentModel;rnusing System.Data;rnusing System.Drawing;rnusing System.Linq;rnusing System.Text;rnusing System.Windows.Forms;rnusing System.Data.SqlClient;rnrnnamespace prornrn public partial class Form1 : Formrn rn DBconnention db = new DBconnention();rn private SqlConnection conn = null;rnrn public Form1()rn rn InitializeComponent();rn rn public void gettall()rn rn this.cbbm.Items.Add("人事部");rn this.cbbm.Items.Add("市场部");rn this.cbbm.Items.Add("人力资源部");rn this.cbbm.DropDownStyle = ComboBoxStyle.DropDownList;rn this.cbbm.SelectedIndex = 0;rn rn private void Form1_Load(object sender, EventArgs e)rn rn this.gettall();rn rnrn private void button1_Click(object sender, EventArgs e)rn rn conn = db.gett();rn string name = this.txtname.Text;rn string sex = this.radman.Checked ? radman.Text : radwoman.Text;rn string age = this.txtage.Text;rn string hobby = this.txthobby.Text;rn string cbbm = this.cbbm.TabIndex.ToString();rn string sql = "insert into Userinfo values(@name,@sex,@age,@hobby,@deptid) ";rn tryrn rn conn.Open();rn SqlCommand comm = new SqlCommand(sql, conn);rn comm.Parameters.AddWithValue("@name", name);rn comm.Parameters.AddWithValue("@sex", sex);rn comm.Parameters.AddWithValue("@age", age);rn comm.Parameters.AddWithValue("@hobby", hobby);rn comm.Parameters.AddWithValue("@deptid", cbbm);rn int a = comm.ExecuteNonQuery();rn if (a > 0)rn rn MessageBox.Show("添加成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);rn rn rn catch (Exception ex)rn rnrn MessageBox.Show("你错误的原因是:" + ex.Message);rn rn finallyrn rn conn.Close();rn rn rnrn rnrnrn/////在C#中添加成员到Userinfo 表中会出现主键与外键的冲突,我想添加成功了是不是在Userinfo 中最后出现的部门是个数字呢? 要是数字那该怎么写?求解答、菜鸟刚学C#。望大哥大姐们多多指教。rnrn 论坛

没有更多推荐了,返回首页